Load external SWF file into another SWF

Hello all.
I've tried loading a .swf file externally into another .swf file on my  local drive, and it works. Now, when I try to Simulate Download, the  preloader in the 2nd file doesn't get played and the images in there  take a while to get displayed.
I need to load a .swf file from a server into the parent .swf file(I'm  working on using a "thin flash file" for added security for the company I  work for - blank file which loads the content from another file on  their server).
So far, I have:
try
    var myLoader:Loader = new Loader();
    addChild(myLoader);
    var url:URLRequest = new URLRequest("newBook.swf");
    myLoader.load(url);
catch (e:Error)
    trace("ruhroh");
When I replace the "newBook.swf" with the URL of another .swf, there's just a blank page.
I'm not too sure how to proceed, and I hope you will be able to help me out. I'd greatly appreciate the help.
Many thanks,
-Nazgul

What happens is...when I set the speed to DSL(32.6kbps), the screen is blank and the preloader doesn't show up. It just goes directly to the Main screen. And then, the pages inside don't get loaded properly.
This only happens when I try to Simulate Download.
But that's not really the problem. I need to load a .swf file from a server into another .swf file, and just adding the link to the child .swf isn't working.
Anyway, thanks for your help
-Nazgul

Similar Messages

  • I need to access/pass variables'(s) of a .swf file into another .swf file.

    Hi all,
    I have basic knowledge of Flash and AS3.0.
    Suppose i have a flash swf file(main.swf). In this main.swf
    file, i loaded another swf file(sub.swf) by writing the following
    code snippet in main.swf file as shown in Attach Code:
    Now, how to acess the data present in main.swf into sub.swf.
    Note: Here data represents values/data stored in
    variables/objects of main.swf file.

    Does this actually work -- assigning variables directly on the loader?  I'm interested in setting flash variables on the loaded SWF, but I get a compilation error when trying something similar:
    Error: Access of possibly undefined property x through a reference with static type flash.display:Loader.
         [exec]
         [exec]             textLdr.x = 50;
    I also tried casting the loader to Object, which compiles but then fails at runtime.
    -Dave

  • How to load swf files within another SWF and still maintain actionscript

    Hi I was wondering how to embed an swf file inside another
    swf file, If i simply import it to the stage or the library it will
    become a symbol but the actionscript interactivity is lost, another
    question is can I have an actionscript 2 file play within an
    actionscript 3 file?
    The actionscript 2 code for embedding is something like this:
    don't mind the _mc titles
    this.cargame_mc.onRelease = function (){
    loadMovie ("Crusty Rusty's.swf", empty_mc)
    empty_mc._xscale=60;
    empty_mc._yscale=55;
    empty_mc._x=210;
    empty_mc._y=140;
    Please Help its for my uni portfolio, i want to use as2, but
    if i do i would lose the 3d possibility of as3, is there any way to
    export an as3 file and then embed in as2, using a program or
    anything? Thanks!I
    I would just like to say thanks in advance because everyone
    on here is so helpful!

    you can load an as2 file into an as3 file (using the loader
    class) and the actionscript will work in both.

  • Insert an swf file into another Flash file

    Hi,
    I'm a newbie to flash trying to insert an SWF flash file (a game) into another Flash file. However, when I import the swf file into the library and drag it onto the frame (and insert the stop(); command onto the frame action to stop it playing the whole movie), the SWF file plays constantly, ignoring all the actionscript and button commands in the game SWF file.
    When I try inserting it using the Window component, the game SWF refuses to play at all - it just stops (clicking buttons in the game work, but it goes-to-and-stops instead of go-to-and-play like it's supposed to do). The only other component I could find was called "Loader". Using this doesn't work either, it won't play any of the animation, just like using the "Window" component
    When the game SWF is played by itself (by just double-clicking to open it from Windows Explorer or embedding it in a web page), it works fine.
    Any help how to do this would be appreciated.
    Thanks.

    Hi,
    I'm posting in this thread because my problem seems similar but may be not...
    In my first swf, I'm loading a second swf via loadClip().
    My second swf works well alone but when I try to integrate itself in my first swf I'm losing my events. My events only works on my first swf.
    I'v tried your trick with _lockroot but he doesn't work for me too.
    Is someone have an idea to help me ?
    Thx
    My code is really basic
    First swf:
            var mcloader:MovieClipLoader = new MovieClipLoader();
            var listener:Object = new Object();
            listener.onLoadInit = function (mc:MovieClip){
                main_obj.__preloader.die();
                obj[funct](target_mc, param);
            mcloader.addListener(listener);
            mcloader.loadClip(file_name, __loader);
    Second swf:
        var box:MovieClip = this.createEmptyMovieClip("box"+depth, this.getNextHighestDepth());
        //Draw box
        drawBox(...);
        // Event on Box, Change Alpha and show arrow or not
        box.onRollOver = function() {
            drawBox(...);

  • Joining several swf files into one swf file

    hello everybody
    i've been dealing this issue for too long and decided to ask for  help - how can I unite 15 swf files which placed in one folder to a one swf file???
    i tried all kindes of merging softwares like "Join (Merge, Combine) Multiple SWF Files Into One Software" and "WinMerge" without success and tried to convert swf to flv (cause i found other merging software for flv files) but again...
    I have CS5 so if i'll have to open Flash for this i will, though i'm trying to avoid that and even then i'm gonna need full instructions.
    All i need is this simple thing so i'll appreciate very much any help
    Thanks & Good Day
    Keren

    Hi Ned
    Again - thank you very much.
    I've got the source files and i'm on the run now.. kind of..
    I did as you recomצended and used a code from one of the AS3 UILoader tutorials , and it seems to work:
    import flash.net.URLRequest;
    import flash.events.ProgressEvent;
    import fl.containers.UILoader;
    var myLoad1 = "fastflipPage.swf";
    var request:URLRequest = new URLRequest(myLoad1);
    loader.scaleContent = false;
    loader.addEventListener(Event.COMPLETE, completeHandler);
    loader.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    loader.load(request);
    loader.load(request);
    function progressHandler (event:ProgressEvent):void
    status_txt.text = "Percentage Loaded" +
    Math.round(event.target.percentLoaded);
    function completeHandler (event:Event):void
    status_txt.text = "Loaded Done";
    So... i'm tring to find some answers to my next step : in the code above im loading only one file and i need to load 30 files so they could play one after another. i noticed that i can create many uiloader instances and load several external SWFs in the same scene without writing a script to each one of them... is that right? and if so, how can i do that???
    I'm full of hope to figure this task, meantime will look for more answers
    Thanks in advance
    Keren

  • How to call a .swf file in another .swf file?

    Hi all,
    I am new to flash and ActionScript3.0. Presently, I am using
    flash CS3 and the code I need is in ActionScript 3.0.
    Suppose, I have a .swf file(viz., file1.swf). Now, i am
    developing one more .swf file(viz., file2.swf), in which I need
    to execute file1.swf when a CLICK event is listened on button
    present in second file(i.e., file2.swf).
    In how many ways, we can get this.
    And, please I need code very urgently.
    Help me.

    You use the Loader class to load external content like swf's
    or images. If
    you click the main entry for Loader Class in the AS3 help,
    there's an
    example of loading an external swf.
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Linking SWF file in another SWF file

    Hi All,
       I need to open  a SWF file by clicking a a button in another SWF file(both SWF files are in the same folder). Can I use URL button(in Xcelsius 2008) for getting this done?

    It is possible to use the URL button to open another SWF file.  The SWF file would need to be hosted with an http address.

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

  • How to call swf file within another swf file using xml

    hii,
    I am facing some problem to call a swf file via xml when this xml file loaded it calls another swf file which includes a new xml file. now if i call this nested swf calling without xml it works but in case case of xml it is not showing the result. i m confused. how to nested xml file calling done in as2/as3. i need some logics. thanks in advance

    This is the AS3 forum and your posting involves AS2 code.  You should repost in the AS2 forum...
    http://forums.adobe.com/community/flash/flash_actionscript
    Aside from that, your problem might lie in the following lines...
    _root.createEmptyMovieClip("sub_container1", 1);
    loadMovie(sub_SWFPath[1].attributes.url, "sub_container1");
    You create the new movieclip, sub_container1,  in the _root, but you do not assign the loadMovie to load into that same movieclip (unless you have a _lockroot = true assigned in your sub-swf).  In any case, you should repost in the AS2 forum to pursue resolution.

  • Loading external (PDF)file into BLOB colum in the table.  Need urgent help.

    Hi All,
    I've currently been working on loading many external binary files (PDF) into BLOB column. After some digging, I learn that the SQL*LOADER can be used to load data from external files into table. I also got help from another forummate mentioning to use PL/SQL procedure to do so. Since I have not done anything like this before. So, my question is what is the simple approach needed to upload PDF files into a table(there is only one table containing BLOB column in my database). In addition, the LOBs can not be query-able, I wanted to list the contents of the LOBs column to make sure that I did successfully upload data into the database. How can I do that?. I do need your help. Please direct me step by step how to do so. Your help is greatly appreciated.
    Regards,
    Trang

    Once the PDF file is inserted in the PDM table, i am not able to read the PDF data from the below code, This code converts the binary data into the Character data i.e BLOB data into the CLOB, but still the data is not proper which is getting inserted PDF is proprietary format of Adobe. And you cant just read it from pl/sql. You need Adobe software installed in your client machine to view it.
    Here is an example of how to do it.
    [url http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:232814159006] Display PDF Stored in Database from ASKTOM 

  • 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

  • My movie swf file in another swf

    I cant get the movie I have loaded in ( a quiz ) to display
    the statistics about how many I have got wrong/right.
    is it possible to get it to show the data because it is the
    main part of the movie after the user has completed it.
    PM me and I will e-mail you a file.
    Do I need to put in the Drag and Drop things as well?
    Each quiz has one of these. Will the movie find the right
    details?
    Why should it do this?

    look in the other forum ( Flash Actionscript ) to see the
    message replies. I cant delete the post I made and that is
    annoying!!!

  • Making xml playlist to play swf files inside one swf

    Hi,
    I have made an swf file and xml playlist.
    I want to include swf filepaths in xml playlist so i would be able to choose from my the list, which file i want to play.
    My list-component reads data from the xml, but i cannot get the swf files open there.
    I will attach my .fla file so you understand what i'm talking about.
    the .fla:
    http://www.mediafire.com/file/m24dz0gmzwz/Untitled-1.fla
    xml file:
    http://www.mediafire.com/file/gdyzzymy5mn/swfList.xml
    would you guys look at my files? i know i can play .flv files but i want to know how to play swf files inside another swf. The swf files should be loaded to  by the xml list.

    Hi
    we want to give some clarifications
    As per our requirement we need to play same swf file ( about
    5 in number) always.
    These swf files are kept in some folder and during run time
    we need to play these swf files inside our Mac / windows
    application using flash player.
    we don't need to play any swf file, but the same swf files
    we need a api / sdk to implement this
    Any help will be very well appreciated
    Sudesh

  • Textbox shows xml text in working file but now when loaded into another SWF

    Hi all,
    I have downloaded an xml gallery (as2) as we needed one for an old as2 file. Now I mostly use as3 but thought as I only needed to tweak it there would be no probs. Of course, it rarely works out that way. The problem is, text loaded from the xml file is displayed with its corresponding image. This works fine in the file. When I load the SWF into another SWF however, it all works EXCEPT the text doesn't show at all?? Whoever made the gallery used 'device fonts' in the textbox, I don't know if this has anything to do with it. I tried changing the textbox to dynamic and embedding characters but still nothing.
    This seems the key line -
    _root.descmc.desc.htmlText = XMLdaten[number];
    I have also tried
    _root.descmc.desc.htmlText = XMLdaten[number].firstChild;
    This traces out the correct xml data when tested so it is finding it okay.
    Any help would be much appreciated.
    Thanks

    The problem might be in the use of the "_root"  You probably need to set _lockroot = true; in the loaded swf, otherwise the _root is that of the loading swf, not the loaded one.

  • Is it possible to Load External SWF files into Flex Mobile projects?

    Hi Guys,
    I'm trying to load an external asset in this cse (a SWF file) into my flex project (Apple IOS IPAD), don't get any luck. Can any one suggest a solution ?

    In Apple's words, "No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple's Documented APIs and built-in interpreter(s)".
    Hence external swfs cannot be loaded in iOS.

Maybe you are looking for

  • XML Element to string conversion returning null

    Hi, When i try to convert XML Element to string using toString() API, it returns something like [device: null] where device is element tag. Code is as follows - Document xmlDoc; DOMParser parser = (DOMParser)Class.forName("org.apache.xerces.parsers.D

  • My bb doesn't connect to browser or app world pls help.

    i have a bb 9300 and my browser does not load, also app world doesn't work, it tells me i have to upgrade but since i cannoct connect to the browser i cant do it. i cannot connect my emails either although apps such as fb work.. whats the problem and

  • Hi experts i have doubt in transports...................

    Hi, There are two types of  SLD's  one is centralized and decentralized so for which we need transports and how to transport the sld objects Thanks in advance Ram vijay

  • SQL error 17410 No more data to read from socket

    Hi, I may have reached some stability limit of my JDBC thin driver, DB version and the complexity of my use cases?? DB= 9.0.1.0 Jev/OC4J = 9.0.2 So this includes the JDBC thin driver included that looks like version; 9.0.2.7.99 It made no sense but c

  • Cost center -Description

    Dear Experts, How it is possible to maintain How to maintain description in several languages for cost centers? my client has branches in other countries, so when we maintained description in English (sap login language "EN"), my client is not able t