Load external text in a user friendly way

Ok this is what i want to do.
I know how to load external text files in AS3 but I want the user to be able to do it from within my excited swf file. The obvious way to do this is to load the text file  using a string from a dynamic text field (e.g: "myfile/myTextFeild.txt") but i want it to be more user friendly.
If you click file open in Microsoft word, for example, you get the user friendly open box where you can find the file you want to load by browsing through your hard-drive.
Can you do something like this is AS3?
Any feedback would be much appreciated.
Thanks

see if you can extrapolate the path from there. FileReferenceList.browse()

Similar Messages

  • Group and display characteristics in a user friendly way

    Hi all,
    We have a scenario where we have created a DOC type which we assigned to a class with several characteristics.
    The problem is that the characteristics are not disaplayed in a very user friendly way in tab "additinal data".
    Is there any customizing we can do in order to group the characteristics?
    For example:
    -Is it possible to show 3 or 4 characteristics and then have an empty line and then show another 4
    -or Is it possible to customize to create sub tabs?
    Any other ideas that can make it easier for the end users to change/display their characteristics would be helpful!
    Best Regards
    Mikael

    Hi,
    Is there any customizing we can do in order to group the characteristics?
    For example:
    -Is it possible to show 3 or 4 characteristics and then have an empty line and then show another 4
    -or Is it possible to customize to create sub tabs?
    All the configuration data is stored in some tables. So adding some lines as a separator into a database won't be possible since tables have fields which have certain data types which won't match the requirement.
    Hence your requirement cannot be met.
    Hope this answers your query.
    Regards,
    Deepak Kori

  • Most user friendly way to browse document libraries for saving documents

    We are trying to figure out the most user friendly way to save office documents to different site collection document libraries.  The locations appear fine when we click "save as" for recent folders.  We can even click browse and use
    the up arrow for getting closer to the root path of the site.  This works fine, but there is not an easy way navigate to a different site collection.  Sure, I can copy/paste the web address in the file path, but I think that is asking too much for
    basic end users.  Is there a different approach I am not aware of?
    Thanks,

    How about Link a library to the Windows Favorites Folder, the use favorite to save document.
    https://www.youtube.com/watch?v=VJeRX-h7Hjw
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to load external text file into a Form?

    Hi,
    I made a menu with 1-5 in a Form and 5 external text files. I want the user who is able to view the text content of the text file when he chooses one of them from the menu. And the text file screen has a "Back" command button to let him go back.
    How can I do it and can it support other languages such as Chinese and Japanese?
    Thanks for help.
    gogo

    Sorry, I made the mistake about the subject, it should be loading local file, not external file through http.
    I wrote a method but it throwed an exception when the midlet was run.
    private void loadText()
    try {
    InputStream is = this.getClass().getResourceAsStream("/text.txt");
    StringBuffer sb = new StringBuffer();
    int chr;
    while ((chr = is.read()) != -1)
    sb.append((char) chr);
    is.close();
    catch (Exception e)
    System.out.println("Error occurs while reading file");
    I put the text.txt file in the same folder with the main file (extends midlet). How can I load the text content and display it on StringItem?
    Thanks for any help.
    gogo

  • AS3: Loading External Text into a Master File

    I have a master file that I want to load an external text
    file into. This external text file will also have an external style
    sheet applied to it.
    In your opinion, which way is best to load the external text
    file?
    1) Generate a text field dynamically in the master file using
    the TextField class and then loading the external text in.
    2) Placing (at authoring time) a dynamic text box on the
    master file's stage and loading the text in.
    3) Placing a dynamic text box in a separate .swf file and
    then loading that external swf in to the master file, then loading
    the external text into the text box.
    Any opinions?
    Thanks...
    Brenda

    On my project im going with the third choise, dont ask why,
    cause i just do.
    only difference is that i also lad my data into this external
    swf file.
    in other words i use mainly second as well as im going with
    the third one.
    In my opinion, no idea if thats the best way, but i certanly
    know that its (for me) most confortable way.

  • CSS for Dynamically Loaded External Text

    I'm externally loading text from a .txt file. I need to format that file using CSS. I've got the CSS file set up and everything. I've tried every tutorial I can find to try and load the CSS, but nothing is working.
    Here is the script for loading the text:
    var textLoader:URLLoader = new URLLoader();
    var textReq:URLRequest = new URLRequest("content_files/commissions.txt");
    textLoader.load(textReq);
    textLoader.addEventListener(Event.COMPLETE, textLoadComplete);
    function textLoadComplete(event:Event):void
        commissionscontent.htmlText = textLoader.data;
        commissionscontent.htmlText = textLoader.data.split("\r\n").join("\n");
            if (commissionscontent.maxScrollV <= 1){
            scrollBox_mc.visible = false;
            scrollLine.visible = false;
        else {scrollBox_mc.visible = true;
              scrollLine.visible = true;}
    Can anyone help me to load the CSS for this?? I'm really new to Flash and have just been teaching myself, except for now I've hit a wall and I am so incredibly frustrated that it's not even funny.

    var css_loader:URLLoader = new URLLoader();
    var textLoader:URLLoader = new URLLoader();
    var my_css:StyleSheet = new StyleSheet();
    var my_txt:TextField = new TextField();
    css_loader.load(new URLRequest("style.css"));
    css_loader.addEventListener(Event.COMPLETE, onCSSComplete);
    function onCSSComplete(e:Event):void {
        my_css.parseCSS(e.target.data);
        textLoader.load(new URLRequest("commissions.txt"));
    textLoader.addEventListener(Event.COMPLETE, textLoadComplete);
    function textLoadComplete(e:Event):void {
        my_txt.styleSheet=my_css;
        my_txt.htmlText=e.target.data;
        addChild(my_txt);
        my_txt.width=300;
        my_txt.autoSize=TextFieldAutoSize.LEFT;
        my_txt.wordWrap=true;

  • Loading external text, transition effects

    does anyone know how the text effect seen on
    addition.com (under
    the details section) is made? Also, can it be made by loading an
    external text file? if anyone can help or point me in the right
    direction of a tutorial, it would be greatly appreciated.
    thanks-

    well, I hadn't seen the text under the details section, I
    hadn't even selected one of the menu items. So after doing so i
    think I have an answer for you, and did test the theory. If you
    adjust the 'leading' property of a the setTextField() function
    using a variable that is redefined within a loop, you can change
    the width of the line spacing. On the first frame used the code,
    var leading_fmt:TextFormat = new TextFormat();
    leading_fmt.leading = 30;
    leading_txt.setTextFormat(leading_fmt);
    onEnterFrame = function() {
    if(leading_fmt.leading > 0) {
    leading_fmt.leading -=1;
    leading_txt.setTextFormat(leading_fmt);
    Looks like you could adjust things however you would like
    using this method. I'm not certain how they created the color
    change though, I guessing that you could do that with a
    translucient mask effect over the top of the field, or by using the
    text as a mask rather. Just make sure that the character set you
    wanting to use is embed within the dynamic field, and you should be
    set.

  • Handling contraint violations in a user friendly way

    How do you trap constraint violation errors is a user friendly manner ...
    I've seen a number of related posts on the forum but have not yet seen a solution that people are happy with.
    Ideally, Id like to:
    - avoid displaying the 'raw' oracle error to the user
    - display a user-friendly message in an alert box
    - sent the user back to the entry forms with his
    entered data present.
    This requirement seems fundamental to the development of a reasonable application, somebody must have solved it.

    I'm no expert, but here's info from my own experience.
    1. Trap those pk/uk constraint violations in an appropriate exception block. Get this working and test it under all conceivable exceptions.
    2. Write an exception handler, producing the javascript/html/redirects you need.
    Oracle exception handling is pretty mature, but you need to put some effort in to catching everything listed in the package throws declarations.
    If you're working with forms or other components the approach is different, but you weren't terribly specific in your question.

  • User-friendly way to issue chown commands on remote servers

    I'd like my technically unversed users to have, on demand, the benefit of chown commands giving them ownership of certain files being executed on remote servers. I'd like this to be doable without administrators' involvement and with no physical access to the servers by any of the users being entailed.
    By "benefit of chown commands" I mean the results a competent user would get entering the command if he or she were actually doing so. By "technically unversed" I mean specifically that said users aren't and won't ever be trained to ssh into subject servers and issue chown commands themselves directly.
    I should mention that the "Get Info" interface does not in this case avail users of a way to take ownership of particular files because ACEs apply to the files in question. That ACEs apply changes what is presented: instead of any editable fields under Ownership and Permissions, all users see in the "Get Info" interface is a list of whatever ACEs apply.
    Please note that users do, by virtue of ACEs, have "change ownership" permissions for the files in question. Also, authentication to the servers in question under subject users' own logins is possible as necessary.
    What I'd like to start with is getting some idea how complicated this could be for me to do myself as a beginning AppleScripter. I'll describe what I guess would be involved and hope for someone to shed light.
    I'm guessing that something the user at his or her own machine does involving a file he or she has selected would constitute an Apple Event which a process on the client would send to a process on the server. Then I expect the server process would issue the chown command locally respectively of
    1) which file was selected when the Apple Event took place, and
    2) subject user's identity.
    Finally, I expect some feedback might contingently be sent to client process incidentally to need to give user feedback.
    Is this a fair sketch of how this should work? What is a beginner with limited time likely to accomplish attempting this?
    (Find context for this posting here: http://discussions.apple.com/thread.jspa?threadID=831517&tstart=0)
    PowerMac   Mac OS X (10.4.8)  

    First, if I understand you correctly, I'd be using
    Curl and, say, Perl rather than Applescript to get
    this done. In other words, what you wrote in
    Applescript is about all I'd need in that
    language--yes?
    That's correct, give or take any errors in the script. (For obvious reasons I didn't test it.)
    Then, please note that I want to chown, not chmod. Is
    this an issue?
    Nope. (Beyond what you pointed out below.)
    I am looking at Perl documentation and read that "on
    most systems, you are not allowed to change the
    ownership of the file unless you're the superuser..."
    (http://perldoc.perl.org/functions/chown.html).
    However, isn't apache running as root?
    I never thought about that. Wow, this is complicated! Are you really sure you can't make do with chmod instead?
    Anyway, the answer is yes and no. The main Apache process usually runs as root, but executes CGI scripts (and other requests) as another user to avoid inherent insecurity. So unless you do something terribly, terribly insecure, you will not be able to chown from Perl. (And, although I am often lax about security, enabling root access for CGIs strikes even me as dangerous, which means it's a very bad idea.)
    Really what you want is for the CGI, which does not run as root, to hand off to another process which does. I'm not a Unix guru, and would never claim to be, but I think the two following methods might work:
    1. Set up a cron job running as root which looks in a directory once every minute/hour/whatever. The file name should be the user to change the owner to, and it should contain a delimited (in some form; return is possibly safe) list of files. Have the cron job walk through the list of files and use chown, then clobber the contents of the file. (Note that a CGI can use "chmod", which can make sure that the files it creates in the directory are readable by the cron job.) (Also note that you'll want to use flock to avoid race conditions between the cron job and the CGI!) This method would not be instantaneous, since the cron job only runs periodically.
    2. Set up a script which runs as root which takes a line of text in the format:
    user:path/to/file
    and executes chown using that information. Make this process run at startup as root. Have it open a named pipe, with permissions such that CGI script can write to it, and watch for input from that pipe.
    Some general notes:
    A. Whatever you do, make sure that the binary/script/whatever running as root can't be written to by anyone who doesn't have root permissions.
    B. Make sure to check that the user and file actually exist before doing anything with them. (And make sure to do it in the root process, since you have no guarantee that someone won't figure out what's going on and come up with some clever injection scheme to make your root process break security.) (And don't do it by passing a command to the shell; use Perl's chown or some equivalent, so that you'll be somewhat less vulnerable.)
    C. For that matter, don't forget to check and make sure that the path you're about to chown is within the share point, and that the user you're going to chown to makes sense in context, so that nobody can (for example) take over someone else's user directory, or get write permission to /sbin, or something evil like that. (In fact, it might be for the best if you limited the chown operations to files only, just to be sure.)
    Also, I get the part about how a constraint involving
    "do shell script" method argues against using pure
    Applescript in this case. But just for my information
    is Applescript otherwise sufficiently capable?
    If it weren't such matter of getting everything on
    one line, could Applescript send commands between
    hosts, convert local paths to paths on servers, issue
    change ownership commands, and handle authentication?
    Do methods adequate to those purposes exist in
    Applescript?
    Or would using multiple scripting languages be
    entailed anyway? I'm guessing the latter.
    Yes and no. Helpful answer, right?
    First and foremost: AppleScript was originally created as a language to control programs, which would have an extensible grammar through the installation of files called "Scripting Additions". It has since been puffed up via AppleScript Studio to an application-building language in its own right, but the language itself does not have support for a lot of things which, nevertheless, the language can do by controlling another program or by extension.
    AppleScript can send messages between hosts. If the remote host is a Mac, and has "Remote Apple Events" turned on in the "Sharing" control panel, then you can send commands to programs on the remote machine almost exactly as though they were local. (The only differences are in how you specify the application and how you let AppleScript know what the remote application "understands".) This support is built into the language.
    If the remote host is not a Mac, you must control a program which can "translate". When it comes to terminal programs, for security reasons Apple did not include any interactive systems which could be controlled. (Although they did include "expect", I see, which would theoretically allow you to work around this...)
    Since converting a path is really just text processing, yes, AppleScript can do that. I didn't try to build that in because I am under the impression that you know some other language/shell scripting tool better than AppleScript, so it makes better sense for you to put as much of the work into the parts you know, in order to make debugging easier. One method of doing it in AppleScript:
    set x to [a POSIX path found somehow for a file on a connected server]
    if (the offset of "/Volumes/" in x) is 1 then
    -- "the offset of" uses 1-based offsets, not 0 as in most languages
    set x to text 10 through -1 of x
    -- This removes "/Volumes/" from the beginning of x
    set x to text ((the offset of "/" in x) + 1) through -1 of x
    -- That removes up through the next slash, which is the volume name
    set x to "/Path/To/The/Share/Point/On/The/Server/" & x
    else
    error "The path isn't in /Volumes/, so either the server is mounted in a nonstandard way or the path isn't on a remote host at all." number 9000
    end if
    (The other method of which I am aware is to change AppleScript's text item delimiter to "/", convert the path to a list, test whether the first item is "Volumes", then put together items 3 and up into a string again. I have always had a semi-irrational prejudice against using this method because Apple's documentation circa about 1996, from which I learned AppleScript, made it sound like this might be dangerous, but it works.)
    The Finder (which can be scripted) can apparently change ownership and permissions -- a fact which I did not know until just now; I must have missed it last time I looked for it -- and of course "do shell script" can be used to call "chmod" and "chown". The problem with both of these methods, vis-a-vis your particular difficulty, is that your files are not local. You could turn on Remote Apple Events and have the Finder do it, but that's really a security hole. And a potentially maddening one to figure out if anyone starts exploiting it.
    I'd stick with a CGI and the cron/named pipe scheme. No matter what you do you're going to have a little extra security risk, just because chown requires root permissions, but minimizing that risk is probably a good thing.

  • User friendly way to let user pick a report?

    I have a table that stores report names, the user that generated the report and report date. What is the best method for displaying a list of available reports and letting the user select one for viewing? Would it be an LOV?
    Darren

    Hai,
    Try Tree View Or List item with List Style as Tlist. Because the user can see more than 1 report name at a time.
    Regards,
    Manu.

  • External Text Marquee

    Hi,
    This is the simplest way of loading external text into a
    Dynamic Text Field:
    loadVariablesNum("YourFile.txt", 0);
    Right ...
    Could anyone please tell me what is the simplest way of
    animating it ?
    I need a marquee effect for external text loaded into a
    dynamic text field ...
    Thanks in advance
    Hassan

    OK. I don't think you need to use LoadVariablesNum - although
    I guess that should work (I don't use these anymore I always use
    LoadVars)
    If you see the trace working but nothing displaying then you
    just need to associate you variable with a dynamic text field on
    stage
    Give this a try:
    //testing only... this would normally be set up in the
    external YourFile.txt text file without the quotes (actually I just
    looked at some of the livedocs examples and they used quotes... but
    I don't usually.
    mytext="Lorem ipsum dolor sit amet, consectetur adipisicing
    elit, sed do eiusmod tempor incididunt ut labore et dolore magna
    aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
    laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
    dolor in reprehenderit in voluptate velit esse cillum dolore eu
    fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
    proident, sunt in culpa qui officia deserunt mollit anim id est
    laborum."
    //code on main timeline
    loadVariables("YourFile.txt", this);
    this.onEnterFrame = function() {
    if (mytext=="" || mytext==undefined) return;
    var tmpArr = mytext.split("");
    tmpArr.push(tmpArr.shift());
    mytext= tmpArr.join("")
    trace(mytext);

  • Load dynamic text into Captivate form external file

    Is it possible to load dynamic text into a Captivate file from an external file like an XML using Javascript.
    I see there's a way to get it form the query scring of the URL ( http://captivatedev.com/2011/05/01/how-to-jump-to-a-specific-slide-in-a-separate-course/ ), but I have a project where I want  several pieces of text to be replaced and we want to be able to edit it externally from the Captivate file.
    Thanks!

    Hi Ned,
    What I'm doing is using a yahoo map to load addresses and
    place custom swf files as the placemarkers. The main stage has an
    instance of myMap, which is the map that yahoo sets us to display
    the ACTUAL map. They have also provided coding for placing markers
    on the map, which is what I'm using.
    I have the addresses throughout multiple xml files, which I
    am actually loading through 1 single xml file. These addresses are
    being stored in an array, then called by the AS below to place
    markers. All the markers are placed correctly, however, I am trying
    to have them actually say the address - this is where the problem
    lies.
    The marker that is being located and placed has a text field
    called load_text in it. I want that field to load the same address
    that is being used to place it (from the array addressA).
    I'm very confused because every loop through the * for (i=0;
    i<addressA.length; i++) * loop the marker is placed at the
    correct addressA
    location, but I cannot actually get the address to load into the
    load_txt field in the marker. I can even run a trace during that
    loop and it traces addressA for each address, but I can't seem
    to actually load those values into the load_txt box.
    Do you have any ideas?

  • I have created a form that contains fields with default text for a user to update/personalize.  Is there a way to style the text so I can quickly identify changes to default text in a field?

    I have created a form that contains fields with default text for a user to update/personalize.  Is there a way to style the text so I can quickly identify changes to default text in a field?

    George - Thanks you so much!  Actually, i'd love for the text color to be red font color.  Could you send me the script for that? And I assume I just copy and paste the script into the field properties (see screenshot)?
    thanks again!
    Seth

  • Is Dynamic Loading of Text from an external file possible in Captivate?

    Hello all,
    I am wondering if Dynamic loading of text is possible in captivate or not.
    As we can load an external file in flash.
    & which is the universal font to be used for the text entry box which will visible on any media?
    Thanks & Regards,
    Chirag

    Hello,
    I'm not a specialist about JavaScript. Have a look at Jim Leichliter's blog:
    http://captivatedev.com/
    Lilybiri

  • Load the External text and css file for more frames

    hello..
           I created one Movie file. In that I load the External text and css file in first frame and display the first variable value in one text box.
    And then in 2nd frame I use another one text field and display the 2nd variable value like that I want to load the more variable in more textboxes with different frames.
         I loaded  for first variable value in first frame. But I don't know how to do next frames like that..
         Help me...

    You need to load them in the frames they are in.  You can store the loaded data in variables in frame 1, but you will need to extend that layer so that whatever is stored is avaliable in other frames.  The code to load the data into the other textfields can then be done in the frames where it is needed.
    There are other options, such as not using other frames for content or having all of them in frame 1 and making them invisible until you get to the other frames where they get turned visible.

Maybe you are looking for

  • Do i need a new Hard drive? 80gb 6th classic

    I just got this used 80gb Ipod classic 6th gen and i noticed that after i sync music to it, all the music is erased the next time i sync, this is my first time owning a ipod (own a iphone) so im new to these, before i made this thread did a google se

  • Line Output From Audio Interface Mutes When Connected To HDMI

    Hello Apple Community, As my first post to the community, I would like to shed some light on an issue I have found no answer to on the internet or support lines. I have spent a great deal of time self-diagnosing and over the phone with technical supp

  • Transfer Pricing

    Hi Gurus, Where can I define the amount or percentage for transfer prices for a given kombination of characteristics like PC, mat group etc. in New GL Profit Center Accounting? thanks g

  • Unable to start OPMN service

    Hi group, I have applied patch 12.1.2 and followed some steps to configure SOA Gateway and after that I am unable to start Apache Server. I have enabled "debug" option in opmn.xml file as follow: <debug path="F:\ORAEBS_APPS\inst\apps\EBSTEST_srvoracl

  • Can't get simple Automator actions (services) to work

    I've been trying to get very simple Automator services to work in 10.6.2 but I can't. Here's an example. I launch Automator, and hit Services, then choose: Service receives selected: audio files in: any application. Then add an action: Set Info of iT