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.

Similar Messages

  • 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?

  • 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()

  • How do I put text into an Edge File that clients can edit easily afterwards

    Hi
    Can anyone explain how I can put text into an edge file (styled with google fonts) and make it so that clients can access the text and update the text as they require?
    Previous suggestion was dynamically loading a .txt file - any instructions would be most appreciated.
    Thanks.

    Hi Resdesign!
    Your code is very useful to learn how to use Json in Adobe Edge Animate!
    But I have a question: why you use ( i ) as argument of the function UpdateInfo and when you recall it you use ( index )?
    $.getJSON('slides.json', function(data){
              //for(var i=0; i<data.length; i++){
    function updateInfo(i){
                        sym.$("photo").css({"background-image": "url('"+data[i].image+"')"});
                        sym.$("pillar").html(data[i].pillar);
                        sym.$("what").html(data[i].what);
                        // position
              index = -1;
              sym.$("btn").click(function(){
              index++;
                        if (index>=5){
                                  index = 0;
              updateInfo(index);
    Many thanks for your attention!
    Davide

  • How to add  basic data text into material master?

    Hi anybody,
    I want update only basic data text into material master. how to update basic data text ?
    is it any bapi or functional module is there in abap?
    anybody please tell me.
    tks
    s.muthu

    Hi Subramanyan,
    Check this function module:
             CREATE_TEXT
    Check out this sample program:
    REPORT ZMM_INSERT_LONGTEXT.*Internal table to hold long text...
    DATA:
      BEGIN OF T_UPLOAD OCCURS 0,
        MATNR LIKE MARA-MATNR,             " Material number
        ID(2) TYPE C,                      " Identification
        LTEXT LIKE TLINE-TDLINE,           " Long text
      END OF T_UPLOAD,*Internal table to hold long text....
      T_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE.DATA:
       W_GRUN LIKE THEAD-TDID ,            " To hold id
       W_OBJECT LIKE THEAD-TDOBJECT VALUE 'MATERIAL',
                                           " To hold object id
       LV_VALUE(70).                       " Value to hold material number
    START-OF-SELECTION.* This perform is used to upload the file
      PERFORM UPLOAD_FILE.* This perform is used to place the text in MM02 transaction
      PERFORM PLACE_LONGTEXT.
    *&      Form  create_text
    This routine used to create text in MM02 transaction
    Passed the parameter w_grun to P_C_GRUN
                    and lv_value to P_LV_VALUE
    FORM CREATE_TEXT  USING    P_C_GRUN
                               P_LV_VALUE.  DATA:
        L_ID LIKE THEAD-TDID,
        L_NAME(70).  MOVE : P_C_GRUN TO L_ID,
             P_LV_VALUE TO L_NAME.  CALL FUNCTION 'CREATE_TEXT'
           EXPORTING
             FID               = L_ID
             FLANGUAGE         = SY-LANGU
             FNAME             = L_NAME
             FOBJECT           = W_OBJECT
         SAVE_DIRECT       = 'X'
         FFORMAT           = '*'
           TABLES
             FLINES            = T_LINE
          EXCEPTIONS
            NO_INIT           = 1
            NO_SAVE           = 2
            OTHERS            = 3
      IF SY-SUBRC <> 0.
        CLEAR LV_VALUE.
      ELSE.
        DELETE T_LINE INDEX 1.
      ENDIF.ENDFORM.                    " create_text&----
    *&      Form  upload_file
    This routine is used to upload file
    No interface parameters are passed
    FORM UPLOAD_FILE .  CALL FUNCTION 'UPLOAD'
       EXPORTING
        CODEPAGE                      = ' '
        FILENAME                      = ' '
          FILETYPE                      = 'DAT'
        ITEM                          = ' '
        FILEMASK_MASK                 = ' '
        FILEMASK_TEXT                 = ' '
        FILETYPE_NO_CHANGE            = ' '
        FILEMASK_ALL                  = ' '
        FILETYPE_NO_SHOW              = ' '
        LINE_EXIT                     = ' '
        USER_FORM                     = ' '
        USER_PROG                     = ' '
        SILENT                        = 'S'
      IMPORTING
        FILESIZE                      =
        CANCEL                        =
        ACT_FILENAME                  =
        ACT_FILETYPE                  =
        TABLES
          DATA_TAB                      = T_UPLOAD
         EXCEPTIONS
           CONVERSION_ERROR              = 1
           INVALID_TABLE_WIDTH           = 2
           INVALID_TYPE                  = 3
           NO_BATCH                      = 4
           UNKNOWN_ERROR                 = 5
           GUI_REFUSE_FILETRANSFER       = 6
           OTHERS                        = 7
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.  SORT T_UPLOAD BY MATNR ID.
    ENDFORM.                    " upload_file
    *&      Form  place_longtext
    This routine places the text in MM02 transaction
    No interface parameters are passed
    FORM PLACE_LONGTEXT .  LOOP AT T_UPLOAD.    T_LINE-TDFORMAT = 'ST'.
        T_LINE-TDLINE = T_UPLOAD-LTEXT.
        APPEND T_LINE.    IF T_UPLOAD-ID EQ 'BT'.
          MOVE T_UPLOAD-MATNR TO LV_VALUE.
          MOVE 'GRUN' TO W_GRUN.                   "Test ID for Basic data text
          PERFORM CREATE_TEXT USING W_GRUN LV_VALUE.
        ENDIF.    IF T_UPLOAD-ID EQ 'IT'.
          CLEAR W_GRUN.
          MOVE T_UPLOAD-MATNR TO LV_VALUE.
          MOVE 'PRUE' TO W_GRUN.                      "Test ID for Inspection text
          PERFORM CREATE_TEXT USING W_GRUN LV_VALUE.
        ENDIF.    IF T_UPLOAD-ID EQ 'IC'.
          CLEAR W_GRUN.
          MOVE : T_UPLOAD-MATNR TO LV_VALUE,
                 'IVER' TO W_GRUN.                    
                                                      "Test ID for Internal comment
          PERFORM CREATE_TEXT USING W_GRUN LV_VALUE.
        ENDIF.
      ENDLOOP.ENDFORM.                    " place_longtext
    Hope this helps you.
    Regards,
    Chandra Sekhar

  • Load external jpeg into flash movie

    Hi, how do i load external jpeg into flash movie?
    Can someone show me the actionscript? Thanks

    hi, i pasted the code on a mc but it didn't work.
    However, when i put in on frame action, it works.
    However, i realised the image flickered (more like refreshed)
    after afew sec...
    Is this normal? Is it the loop problem? how do i get rid of
    that?

  • Load several texts into several fieldtexts

    --- Flash CS3 ---
    Hello every body,
    I would like to load several texts into several fieldtexts at
    the same time.
    I have a script working well with only one:
    var textLoader:URLLoader = new URLLoader();
    var textReq:URLRequest = new URLRequest("text/titre.txt");
    function textLoaded(event:Event):void
    titre_txt.text = textLoader.data;
    textLoader.load(textReq);
    textLoader.addEventListener(Event.COMPLETE, textLoaded)
    If somebody can show me how to fixe it up, it could be very
    nice !
    Sorry for my English…
    Take care,
    FrenchBobcat.

    Fanny,
    You don't need to populate the adapter data-load rule option. Per the documentation you can also populate the Locations Metadata Integration Option #1 with the DataLoad rule name. This will allow you to leverage one adapter in the FDM application; but pull from several ledgers.
    Of course each ledger would then be a seperate FDM location.
    Thank you,

  • 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

  • Load external XML into DataGrid with AS3

    I've really looked hard to find an example/tutorial for
    loading external XML data into a DataGrid component using AS3. The
    code I'm using at the moment has the XML data in the AS code. If
    anyone can point me to a good resource(s) for code or a tutorial
    I'd be very appreciative. It needs to be AS3. ~steve
    Here is the code that is working for internal XML data:
    import fl.controls.dataGridClasses.DataGridColumn;
    import fl.data.DataProvider;
    stop();
    var emailXML:XML = <emails>
    <email date="06-04-07" code="EMRPAAV" campaign="This is
    the campaign details."/>
    <email date="06-11-07" code="EMRPAAW" campaign="This is
    the campaign details."/>
    <email date="06-18-07" code="EMRPAAX" campaign="This is
    the campaign details."/>
    <email date="06-25-07" code="EMRPAAY" campaign="This is
    the campaign details."/>
    <email date="07-02-07" code="EMRPAAZ" campaign="This is
    the campaign details."/>
    <email date="07-09-07" code="EMRPABA" campaign="This is
    the campaign details."/>
    </emails>;
    var dateCol:DataGridColumn = new DataGridColumn("date");
    dateCol.headerText = "Date";
    dateCol.width = 60;
    var codeCol:DataGridColumn = new DataGridColumn("code");
    codeCol.headerText = "Source Code";
    codeCol.width = 70;
    var campaignCol:DataGridColumn = new
    DataGridColumn("campaign");
    campaignCol.headerText = "Campaign";
    campaignCol.width = 300;
    var myDP:DataProvider = new DataProvider(emailXML);
    emailData.columns = [dateCol, codeCol, campaignCol];
    emailData.width = 440;
    emailData.dataProvider = myDP;
    emailData.rowCount = emailData.length;
    // end code

    Here is how you build it for external XML. in my example am
    using the same xml format that you are using . The xml file called
    "dataGrid.xml"
    import fl.controls.dataGridClasses.DataGridColumn;
    import fl.data.DataProvider;
    import fl.containers.UILoader;
    import fl.data.DataProvider;
    import fl.events.*;
    import flash.xml.*;
    var emailXML:XML;
    var myList:XMLList;
    function parseXML():void
    var url:String = "dataGrid.xml";
    var urlRequest:URLRequest = new URLRequest(url);
    var loader:URLLoader = new URLLoader();
    loader.addEventListener("complete" , loadXML);
    loader.load(urlRequest);
    /*var emailXML:XML = <emails>
    <email date="06-04-07" code="EMRPAAV" campaign="This is
    the campaign details."/>
    <email date="06-11-07" code="EMRPAAW" campaign="This is
    the campaign details."/>
    <email date="06-18-07" code="EMRPAAX" campaign="This is
    the campaign details."/>
    <email date="06-25-07" code="EMRPAAY" campaign="This is
    the campaign details."/>
    <email date="07-02-07" code="EMRPAAZ" campaign="This is
    the campaign details."/>
    <email date="07-09-07" code="EMRPABA" campaign="This is
    the campaign details."/>
    </emails>
    parseXML();
    function loadXML(evt:Event):void
    emailXML = new XML(evt.target.data);
    myDP = new DataProvider(emailXML);
    emailData.dataProvider = myDP;
    var dateCol:DataGridColumn = new DataGridColumn("date");
    dateCol.headerText = "Date";
    dateCol.width = 60;
    var codeCol:DataGridColumn = new DataGridColumn("code");
    codeCol.headerText = "Source Code";
    codeCol.width = 70;
    var campaignCol:DataGridColumn = new
    DataGridColumn("campaign");
    campaignCol.headerText = "Campaign";
    campaignCol.width = 300;
    var myDP:DataProvider;
    emailData.columns = [dateCol, codeCol, campaignCol];
    emailData.width = 440;
    emailData.dataProvider = myDP;
    emailData.rowCount = emailData.length;

  • Loading external Swf into a specific area in Fla file

    I'm sure this question has been asked a trillion time. But truth be told there's no good tutorial for this out there!
    I am trying to load an external swf slide show into my fla file. I want to be able to load into a specific place on the stage.
    I have this code for preloader that loads in an external swf, but it covers the entire swf. Is there any way of changing this slightly to allow it to be loaded in one spot?
    var l:Loader = new Loader();
    l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
    l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
    l.load(new URLRequest("Fuggles Brasserie Restaurant4.swf"));
    function loop(e:ProgressEvent):void
    var perc:Number = e.bytesLoaded / e.bytesTotal;
    percent.text = Math.ceil(perc*100).toString() +"%";
    function done(e:Event):void
    removeChildAt(0);
    percent = null;
    addChild(l);
    Cheers
    t

    If the loaded object fills the stage, then I have to wonder why you need to locate it anywhere specific.  Or is it possible you are just unloading the rest of the visuals when you use that removeChildAt(0) command such that the loaded object is the only thing  remaining.  In any case, you can assign x and y properties to the Loader ( I do it in the done function, but locating the Loader can be done anytime after it is instantiated)...
    function done(e:Event):void
         removeChildAt(0);
         percent = null;
         l.x = someX;
         l.y = someY;
         addChild(l);

  • Unable to load external image into iOS app with AS3

    Just trying out Flash Builder for iOS app development and have run into a problem right off the bat with loading an external image into an iOS app.  The actionscript is very simple (this was basically my Hello World attempt), and I'm hoping someone here can explain where I'm going wrong.  This code works in Flash Pro, and works when launched on the desktop from Flash Builder, but doesn't work on my iOS devices.
    Here's the code:
                                  var container:MovieClip = new MovieClip();
                                  addChild(container);
                                  var imageLoader:Loader = new Loader();
           imageLoader.load(new URLRequest("http://www.google.ca/intl/en_ALL/images/logos/images_logo_lg.gif"));
                                  imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, startListener);
      function startListener (e:Event):void{
                                                 container.addChild(imageLoader);
    Any thoughts on why this won't work would be greatly appreciated!

    I had the same issue, and modified my domain policy file as specified  in http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html#_Configuring_URL_M eta-Policies but the loader is not loading the file. Any ideas on how to fix this issue?

  • As3 loaded external jpgs

    developing a ui in flash for photo gallery which I am loading
    into dreamweaver.
    using as3 in flash to load external photo files so not all
    having to download on opening.
    have had no problem in dreamweaver with swfs with embedded
    jpgs.
    ui comes up in dreamweaver but not external files. even
    though when I open swf movie or the flash created html of same
    file, on its own, no prob.
    anyone run across this problem, jpgs are in same file as
    flash media, also dropped them into image file just in case that
    might work---no go
    any ideas ?

    your isse begins here ..
    loadSection()
    you use the same loader to not only load files but you are tyring to use it to target the movieClip you also want to play.
    The issue is loader.  The loader can only reference one load at a time.. otherwise you screw up your listeners and the ability to unload files properly.
    You should load all files in Your current system as its own variable so that while one loads you can still control a movie.
    So what type of end transitions do your files have?
    What exactly with this seems like youre getting an issue.. looking at it looks alright aside from the fact that some methods are not used at all by your class

  • AS3 load external swf problem, please help...

    Hey guys, I am really in need of an answer here. I would tremendously grateful if someone has the answer. I'll keep it simple and right to the point:
    1. I have created "index.swf" in AS3. Has it's own "MainClass" class.
    2. I created "holder.swf" which is the main landing page. Has 2 buttons, for the viewer to load the site in fullscreen or standard.
    3. In the timeline of "holder.swf" I have created 2 frames, 1st frame containing the buttons, second frame containing the AS3 external swf loader script.
    It does not seem to want to load my "index.swf".
    I have tested a million different ways, it load other swf's just fine, AS2 and AS3, but for some strange reason it just will NOT load "index.swf".
    This is driving me crazy, I have a feeling it has something to do with a class conflict. I have tried (import MainClass;) in the first frame of "holder.swf" and no luck.
    PLEASE GUYS, LET ME KNOW IF YOU KNOW THE ANSWER!
    THANK YOU SO MUCHO.
    Michael

    Hey kglad,
    Thanks for the quick reply!
    Well here is the problem... With the exception of a few things I need to update, as well as implementing some better preloaders etc... the site is running alright...
    About a week ago I decided that I wanted to site to start with the above landing page. A simple "holder.swf" which would give the viewer something to look at before entering the site... (ideally I want to find a script that will begin loading "index.swf" while the viewer is still on "holder.swf", but I'll figure that out later).
    Anyhow, I created "holder.swf" as I have many times before, and for some reason it does not seem to want to load "index.swf" into the second frame when instructed to do so... does that make sense?
    So... ideally I would like the site to start on the above graphic, then once the button is clicked, "index.swf" opens up...
    It's driving me crazy, because my code works on other swf's I've tested it with, just not with index.swf, which leads me to believe there is something in the MainClass.as file which is causing it not to load...
    What are your thoughts?
    Oh, and many thanks again!!!
    M

  • Error 2044 when loading external swf into my site

    Ok what i have is a site made from 1 flash file where i am loading external swf files for my picture galleries. now what is happening is in Flash, dreamweaver and when i test the site, everything is working perfectly, the problem is coming when i go into internet explorer go to the site and click on the flash button to go to the picture gallery, that is when it is giving me a Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
    does anyone know why this is happening and a possible way to fix it? thanks

    See if the following link helps at all...
    http://www.gotoandlearnforum.com/viewtopic.php?f=29&t=20453

  • Loading external swf into Fla. not working

    I have created a Flash page that loads an external swf into
    it when you click a button. The swf loads but the actionscript
    assigned to the swf which scrolls images across does not work. When
    i open the swf in a browser window with the direct link to it the
    scroll works but inside the fla file the swf loads but the scroll
    buttons are not working at all. Would this be something in the
    actionscripting in the swf or fla file. Any advice would be greatly
    appreciated, thank you.

    var imageRequest:URLRequest = new URLRequest("my_gallery.swf");
    var imageLoader:Loader = new Loader();
    imageLoader.load(imageRequest);
    addChild(imageLoader);
    is as3 code.  that won't work in your as2 project.
    here's the equivalent in as2:
    this.createEmptyMovieClip("targetMC",this.getNextHighestDepth());
    targetMC.loadMovie("my_gallery.swf");

Maybe you are looking for

  • Data can not be transfered in "" Problem : WebService in Interactive FOrm

    Hi everyone, According to a tutorial I built a simple PDF Form with WebService as Data Connection (One textfield as input and one button to call the webservice). The WebService is tested in WSNavigator successfully. The button is defined as an execut

  • How do I install Flash on OS X Jaguar (10.2)?

    I have a iMac G3 (Snow) which can connect to the internet through Ethernet, and has Firefox 1.0.0.8. (I will install Firefox 2) I downloaded Flash Player 9 from Adobe, and mounted the DMG, and it had 2 files inside: Flash Player.plugin, and flashplay

  • Error in Adaptor

    Hi Guys          I am configuring simple File -to-File adaptor with FCC. In communication channel for sender it showing error "Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion

  • How to get selectedRow index from TableColumnModel

    Hi Folks, Can anybody suggest me how can i get the selected row index from TableColumnModel. User can add any number of rows to the table , but when user clicks on any row I need to get that Index. This is very urgent requirement. I'll will be glad i

  • Oh know, please don't do this to me iPhone!?!?

    Deciding that I have always been a Mac person it was only obvious that I get the iPhone for my job and pleasure. I have come across one major problem!!! I'm Japanese, and I live in Puna Hawaii. Though I speak english with no problem, the world I work