Trouble loading an external swf file implemented with AS3

I am using Adobe Flash CS3
At first, I tried
swf_mc.loadMovie("//swf file
location");
It gave me
quote:
Warning: 1060: Migration issue: The method loadMovie is no
longer supported.
USE: var l = new Loader(); addChild(l); l.load(new
URLRequest("your url"));.
Well, the given code isn't working at all.
But since it is a migration error, I thought maybe I can just
save it into Flash5 format with AS1. Then it worked with most
external swf files. However, the one I am trying to load is a swf
file with AS3, so my older version swf can't load it at all.
Anyone has any ideas about how to load an external AS3 swf
file?

AS3 is a completely different beast than AS1 or 2. loadMovie
was removed from the language.
The answer to your question is two fold. First, Adobe was
kind enough to give us the code when it finds a migration issue.
var _ldr:Loader = new Loader();
addChild( _ldr );
_ldr.load( new URLRequest( "your url") );
Handling progress has also changed. I have a ContentLoader
package on my site that you're free to use that should familiarize
you with the new way that things are done in AS3.
http://sd-dezign.com/blog/?page_id=10

Similar Messages

  • FAQ: How do I load an external SWF file into a parent SWF file?

    A ton of Flash users visit Adobe’s we site every month wondering  about how to load an external SWF file from within another SWF.
    Adobe's own TechNote on the subject attempts to answer the basic question, along with some common follow-up questions, including:
    How do I load more than one SWF?
    How do I load a SWF into a specific location in the display list?
    How do I resize the loaded SWF?
    How do I set its X and Y location?
    Here are some additional resources that elaborate on loading content and on working with the display list:
    Sample files for the above TechNote. A set of 3 FLA and 3 corresponding SWF files, including a parent SWF and 2 SWFs that the parent loads.
    Help > AS3 Developer’s Guide > Loading an external SWF file
    Help > AS3 Developer’s Guide > Loading display content dynamically
    Loading multiple external SWFs within a main SWF – CreativeCow.net forums
    Video tutorial: ActionScript 101 – Episode 6: Adding named objects to the Stage. By Doug Winnie. An example of how to add the loaded external asset to the Stage and modify its location or other properties.
    Video tutorial: Preloading in ActionScript 3.0.  By Lee Brimelow. A slightly more complicated example, showing how to  make the parent SWF display information about the progress of loading  the external SWF.
    Tutorial: Loading and unloading SWFs - FlashAndMath.com
    This article provides several examples of how to communicate between a parent SWF file and the loaded SWF:
    SWF to SWF Communcation via ActionScript 3.0 (by kglad)

    quote:
    Originally posted by:
    NedWebs
    You now seem to want to get rid of the swf once it has loaded
    and played itself thru. To do that you would need to have something
    in the swf itself that triggers its removal in its last frame. The
    following might work...
    MovieClip(this.parent).removeChild(this);
    Unfortunately I couldn't get this to work. I placed it on the
    last frame of the SWF to be called - is that right?
    I am not sure I am doing it correctly...

  • How to Load an external swf using loadmovie in AS3

    I need to create a button with script, on rollover load an external swf into movieclip in AS3.  This was able to create this in AS2, but I need to create this in AS3

    Thanks again Ned.
    Kenneth Russell
    graphic artist, Sr.
    Lockheed Martin - MS2
    2323 Eastern Blvd., Baltimore, MD 21220
    Phone 410.682.0554    Fax 410.682.0543
    From: Ned Murphy <[email protected]>
    Reply-To: [email protected]
    Date: Thu, 23 Jul 2009 19:08:25 -0600
    To: kenneth russell <[email protected]>
    Subject: How to Load an external swf using loadmovie in AS3
    In AS3 you use the Loader class to load external swf's and image files.  You
    should be able to find examples both in the Flash help files and these forums
    if you search.  If you aren't aware of how to code buttons in AS3, that can be
    found as well.  In AS3, just about any kind of interction involves the use of
    event listeners in combination event handler functions... in the case of a
    button rollover an example would be...
    btnName.addEventListener(MouseEvent.ROLL_OVER, overHandler);
    function overHandler(evt:MouseEvent):void {
         // your loading code or whatever
    >

  • Can not load an external swf file from my site

    Hi ...
    I have a fla file which is loading external swf files from my local folders.
    I inserted some of the swf files to a web site and tried to load them from the site, not from my local folder...
    So it gave me a security error like below:
    *** Güvenlik Sanal Alanı İhlali ***security domain-area violation
    http://www.celiktek.com.tr/KIRIL.swf' SecurityDomain öğesi -- security domain element, 'file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf' uyumsuz bağlamına erişmeye çalıştı - tried to reach this incompatible url
    SecurityError: Error #2070: Güvenlik sanal alan ihlali -- security area violation: http://www.celiktek.com.tr/KIRIL.swf arayanı - searcher of this can not reach stage in file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf içindeki Stage'e erişemiyor. -
    at flash.display::Stage/requireOwnerPermissions()
    at flash.display::Stage/get numChildren()
    at KIRIL_fla::MainTimeline/frame1()
    so in my computer, I can load this swf , but how from a website ?
    thnx ...

    Thnaks ...
    I tried to use the securiyt panel that is openede and I added there my site
    www.celiktek.com.tr/KIRIL.swf
    but I still take the error
    *** Güvenlik Sanal Alanı İhlali ***
    http://www.celiktek.com.tr/KIRIL.swf' SecurityDomain öğesi, 'file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf' uyumsuz bağlamına erişmeye çalıştı
    SecurityError: Error #2070: Güvenlik sanal alan ihlali: http://www.celiktek.com.tr/KIRIL.swf arayanı file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf içindeki Stage'e erişemiyor.
    at flash.display::Stage/requireOwnerPermissions()
    at flash.display::Stage/get numChildren()
    at KIRIL_fla::MainTimeline/frame1()
    from my code
    var req:URLRequest=new URLRequest("http://www.celiktek.com.tr/KIRIL.swf");
    var lod:Loader=new Loader();
    lod.load(req);
    addChild(lod);
    lod.x=0;
    does this code works on your computer ... I know it is a weird question ... you dont have to try ...

  • Having trouble loading an external swf (loadmovie?)

    Hello!
    This is my first time ever constructing a web site ONLY using Flash 8. I normally just use elements here and there, and I am totally confused.
    The link to the project is here: www.cathisingh.com/new
    I want the site to be set up so that when I click a button (at the bottom), an external .swf file loads into that gray box in the center. How do I start? Where do I start? I should be able to figure this out, but I am stuck.
    Thanks for the help!

    Hey!
    You can use a script like this to load a swf.
    BUTTON.addEventListener(MouseEvent.MOUSE_UP, LoadExternalSwf)
    function LoadExternalSwf (e:Event) {
         var request:URLRequest = new URLRequest("/media/EXTERNALSWF.swf");
         var loader:Loader = new Loader();
         loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, Finish);
         loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, status);
         loader.load(request);
         function Finish(e:Event) {
              externalMovie = MovieClip(loader.content);
              NameOfYourGreyBox.addChild(externalMovie);
    function status(e:ProgressEvent) {
         var percentage:Number = Math.round(e.bytesLoaded/e.bytesTotal*100);
         progressBar.gotoAndStop(percentage);
    This creates an event listener on your button (BUTTON) so that when someone clicks it, the function LoadExternalSwf is run. That function creates a URLRequest for the file at your URL, loads it, and then adds it to your grey box (which i assume is a movieclip). I included a progress bar function, which creates a variable called percentage that varies from 1 to a 100 and manipulates a progress bar movieclip that has a 100 frames (a bar going from empty to full).
    Let me know if you need anything else.
    I really like your site. It looks great.
    John

  • How to correctly load an external swf file into iosAir app? I'm getting blank screen.

    So this code works flawlesly on Air for Android, it even works fine when I test the movie in Flash, but once I export it, I'm getting a blank screen. I made an swf with a square and withotu any code, and flash still fails to load it. It's weird cause everything works fine when I use the interpreter debugging option, but when I switch to standard debugging the blank screen appears on my ipad. I've read somewhere that it's caused by the way flash saves the link to external files. Thus after the file is compiled Flash fails to find the prefiously added files, which results in a blank screen. There's clearly something wrong with how the process of compiling the application.
    Tried this:
    var Xpos:Number = 0;
    var Ypos:Number = 0;
    var loader:Loader = new Loader();
    var link:URLRequest = new URLRequest("Untitled-1.swf");
    loader.load(link);
    addChild(loader);
    And this:
    var ldr:Loader = new Loader();
    ldr.load(new URLRequest("Untitled-1.swf"));
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded, false, 0, true);
    function loaded(event:Event):void {
    addChild(event.target.content);
    But nothing works. I'm still getting a blank screen. Is there any way to add the swf file manually into the descriptor file cause flash most likely messes it up? I don't really want to use through command line.

    Read this article, especially the bit about loadercontext and currentdomain:
    http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air- apps-on-ios/

  • Trouble loading group of swf files to server.

    Hi, all,
    I have a swf file that has dependent files and it doesn't load on the server so that it plays. It plays on my local computer when I click the index.html file that came with the swf that I want to play, but not when I load it to the server for my web site.
    The folder that I was sent to load onto the server includes
    a subfolder with the swf file that I need to play, but also
    an index.html file,
    a menu.swf file,
    a debug.swf file,
    an exit.swf file and
    an AC_RunActive Content.js file.
    Loading the whole folder on the site, no matter what the path I enter to get there, only brings up a blank screen. The files are there on the server, I can see them, and the file size is the same as on my local computer, so I think they loaded correctly, they just don't play. The closest I've seen is when I make the path to the menu, but then a progress bar shows up for the menu and it never finishes loading.
    I don’t make flash files myself, so I don’t even feel that I have the vocabulary to ask the right questions. Is there a name for this kind of grouping of  files (as described above?)  How do I load it on the server so it plays?
    I'm working in a Dreamweaver site. I don't know if the problem is in how I'm making the path in Dreamweaver or how I'm loading the files on the server. . . or something else.
    Help!

    It looks like a file path problem, which Flash Player can't resolve.
    I'd recommend posting in the Dreamweaver forum and let the pros over there have a look at your code.

  • Loading an External SWF Files not working

    Hello,
    So I have a project I am working on in which I would like to teach how to cash a scratch off card. I have made the scratch and made it so it will "scratch"
    Before:                                                                                                                                               After:
    Now I have saved this out and am trying to load this into my "holder" however I am getting an error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at ScratchTicket()
    When I use this code:
    stop();
    import flash.events.MouseEvent;
    nextPG_btn.addEventListener(MouseEvent.CLICK, nClick);
    lastPG_btn.addEventListener(MouseEvent.CLICK, lClick);
    function nClick(event:MouseEvent):void{
        nextFrame();
    function lClick(event:MouseEvent):void{
        gotoAndStop(3);
    var mcExt:MovieClip;
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
    ldr.load(new URLRequest("ScratchTicketOnly.swf"));
    function swfLoaded(e:Event):void {
        mcExt = MovieClip(ldr.contentLoaderInfo.content);
        ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
        mcExt.x = 50;
        mcExt.y = 50;
        addChild(mcExt);
    What am I doing wrong?
    Is it because of my coding in the External SWF?
    package {
        import flash.display.Sprite;
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
        import flash.ui.Mouse;
        public class ScratchTicket extends MovieClip{
            var scratcherIsActive:Boolean= false;
            var stuffUnderMask:Sprite = new Sprite();
            // init class
            public function ScratchTicket():void{
                stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseIsDown);
                stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseIsMoving);
                stage.addEventListener(MouseEvent.MOUSE_UP, mouseIsUp);
                // make mask           
                stuffUnderMaskClip.mask = stuffUnderMask;
                addChild(stuffUnderMask);
                makeCursor();
            // helper functions
            private function makeCursor():void{           
                trace("Custom cursor can go here");
            // hover effects
            private function mouseIsDown(e:MouseEvent):void{
                //Mouse.hide();
                Mouse.cursor="hand";
                scratcherIsActive = true;
            private function mouseIsUp(e:MouseEvent):void{
                //Mouse.show();
                Mouse.cursor="arrow";
                scratcherIsActive = false;
            private function mouseIsMoving(e:MouseEvent):void{
                if(scratcherIsActive){
                    stuffUnderMask.graphics.beginFill(0x000000);
                    stuffUnderMask.graphics.drawEllipse(mouseX, mouseY,60, 60);
                    stuffUnderMask.graphics.endFill();
        }// class
    }// package
    Any help is great!

    Make sure you check for errors on loading..
    import flash.events.IOErrorEvent;
    ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, uhOhError);
    function uhOhError(e:Event):void
         trace(e);
         // probably put some visual text field here to display the error
    Aside that, on the first block of code mentioned, is that a frame script or running from somewhere in a class? If in a class and it doesn't extend a display object then you can't addChild(mcExt) without erroring.

  • LoadMovie- loading an external swf into movieclip in AS3

    Im extremely frustrated.........im trying to do something
    that was once very simple, which has now become over complicated
    unecessecarily.....i want to do a simple loadMovie type action and
    load an external clip into a movieclip called ph. my AS2 code would
    be:
    loadMovie("ExternalMovieClip.swf","ph");
    or
    on(release) {
    loadMovie("ExternalMovieClip.swf","ph");
    This no longer works. Can somebody tell me the new code that
    i would use with AS3 to do exactly what i just demonstrated? I
    honestly dont even want to touch AS3. The only reason i want to use
    it is because it makes skinning the components SOOOOOO much easier
    than AS2. That is the one and only reason im trying to convert to
    AS3. All the new load movie AS3 examples ive seen on google look
    like half a page long to do what i used to do in 2 lines. There
    must be a simpler and much easier way. I am a designer. It looks to
    me like Adobe went back to making flash for programmers only again
    leaving us designers out of the mix. Someone please help me, im
    desperate. I also have other old code that im sure im going to have
    to convert to AS3 for it to still work, and i may eventually need
    help with that as well, but ill stick with this loadMovie problem
    for now. Any and all help is appreciated. Thanks

    have a look here:
    http://www.smithmediafusion.com/blog/?p=381
    use this:
    var i =new Loader();
    i.load(new URLRequest(”yourSwf.swf”));
    myMC.addChild(i)
    myMC is the name of your clip on the stage.
    Dan Smith > adobe community expert
    Flash Helps >
    http://www.smithmediafusion.com/blog/?cat=11
    http://www.dsmith.tv

  • Loading an external swf file

    New to Flash and actionscript I have jumped in at the deep
    end. I purchased a piece of pre written flash software with
    editable XML to display an interactive UK map. This has come
    without the Fla source. My problem is when trying to load the swf
    into a movie clip on my stage I can not see the map. Something is
    there because the cursor changes to a hand shape. I just used the
    following line of code:
    mc_loader.loadMovie("uk_ir_locator.swf")
    where mc_loader is the instance name of an emty movieclip
    symbol on my stage.The swf and XML file are both in the same
    directory as my file. Can anyone help

    AS3 is a completely different beast than AS1 or 2. loadMovie
    was removed from the language.
    The answer to your question is two fold. First, Adobe was
    kind enough to give us the code when it finds a migration issue.
    var _ldr:Loader = new Loader();
    addChild( _ldr );
    _ldr.load( new URLRequest( "your url") );
    Handling progress has also changed. I have a ContentLoader
    package on my site that you're free to use that should familiarize
    you with the new way that things are done in AS3.
    http://sd-dezign.com/blog/?page_id=10

  • Loading external swf file in a new window

    Hi,
    I've got a few .swf files with video tutorials I've created using Captivate 4.
    I wanted to link them so I've created a main screen with menu with buttons in Flash.
    I've added AS to load the external swf files but they load in the same window. How can I load these .swf files in seperate window so that you could get back to the main window after you've finished watching?
    Here's my code:
    stop();
    var myLoader:Loader = new Loader();
    button1_btn.addEventListener(MouseEvent.CLICK, movie1_1);
    function movie1_1(e:MouseEvent):void
        var myURL:URLRequest = new URLRequest("01_01_Welcome.swf");
        myLoader.load(myURL);
        addChild(myLoader);
    I'm also attaching screenshot with menu in flash

    I've deleted the line and now the code lookes like that:
    stop();
    var myLoader:Loader = new Loader();
    button1_btn.addEventListener(MouseEvent.CLICK, movie1_1);
    function movie1_1(e:MouseEvent):void
        var myURL:URLRequest = new URLRequest("01_01_Welcome.swf");
        addChild(myLoader);
    Unfortunately, it doesn't load the .swf file when you click on the button...

  • Loading external swf file

    Hi all,
    I am trying to load an external SWF file into my website.. but it is not working. Here is my code
    public var CD:Loader=new Loader();
    protected function application1_creationCompleteHandler(event:FlexEvent):void
    CD.load(new URLRequest("http://localhost/assets/slide.swf"));
    addChild(this.CD);
    CD.x=2;
    CD.y=170; 
    // TODO Auto-generated method stub
    Can anyone tell me what is going wrong..
    The url is correct and its working in my browser when i type 'http://localhost/assets/slide.swf' in the browser... So problem is with flex..

    I am pretty sure that Flash's security measures prevents the coder from loading swfs that are not local to the swf that is trying to load them.  So the swf that is trying to load another swf would have to be on the same system or same networked server.  From what I have experienced its best to reference the location of the files from the swf that is doing the loading.  I am not sure if you are still referencing your swf as "http://localhost/assets/slide.swf" but that might be a problem as well.
    so
    mainfolder
    movie.swf
    assets
    slide.swf
    so in movie.swf
    //Start: Put in desired function
    var swfLoader:Loader = new Loader();
    swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
    swfLoader.load(new URLRequest("assets/slide.swf"));
    //End
    Also add this function
    public function loadComplete(e:Event):void
         stage.addChild(e.target.content);
    This might help explain it
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Loader.html
    the first set of bullet points highlight the security options
    ps. I got this working on my end, copy and pasted the code, of course i had to recreate the file system structure and slide.swf

  • What is or isn't possible on iOS?  (Not having Loader, loadBytes(), external swfs, etc)

    My basic question is:  "What are the classes which we should not use for iOS using the packager."
    I have been trying for a few days trying to get a simple Flash app to run on the iPad.  A very simple app (with sound!) with just 2 classes works fine (Performance is a whole other issue.  We will get to that).  But if I try anything else, all I get is a white/black screen on the iPad.  So it would be really nice to know what classes, functions, etc we CANNOT use for the Packager.
    I have fairly simple app (not as simple as 2 classes) which loads some art assets via URLRequest/Loader, puts them on the stage.  Fairly common standard practice in AS3.
    I've read about not able to load an external file using the Packager.  So to fix the situation of loading assets, I have looked into the [embed] tag, which seems to work.  I hope the blogger doesn't mind, but this page is an excellent source on what works and doesn't work with the [embed] tag in it's various flavors:  http://www.richardleggett.co.uk/blog/index.php/2010/03/08/flash_builder_and_flash_pro_asse t_workflows.  For example, AS3 in a swf is stripped out from an external swf using [embed].
    The best way to load an external swf file for iOS seems to be using [embed] with "application/octet-stream" and load the swf through ByteArray (Option #4 in the link above).  This works great on the PC.  HOWEVER, on iPad, it fails.  The [embed] tag works on the iPad with the other ways, so my guess is that loadBytes() does not work.  Is this true Adobe/Flash guys?  Can you confirm this?
    My initial question is "why is this not allowed on iOS?".  If it is because of the fact that it uses a Loader, can it be changed so it's not using a Loader to construct a MovieClip?  I have a ByteArray with the raw swf/MovieClip data.  Why can't I construct a MovieClip from it without going through Loader?
    This loadBytes() failure seems to be the only thing preventing me from using the normal pipeline of Flash development in loading external assets.  If there are other ways people have found, please share!
    Now on to performance.  Adobe, can you post some examples/samples of code which runs at decent performance?  Like a "tech demo" of what is possible using the Packager running on iPad/iPhone.  That would be extremely helpful for everyone.  I have done a lot of the optimizing suggestions on various sites and pages ( and by Adobe http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html), but I am not seeing the 30 fps performance that is MORE than possible on iPhone/iPad.  Displaying and moving around Bitmaps (I don't use any vector graphics) should be blazing fast.  Quake runs on iPad without any problems and that code is 10 years old.  Moore's law dictates that drawing Bitmaps using CPU should be faster than a 3D engine written 10 years ago...  I am trying out the new iOS 4.2 which is supposed to be "significantly" better, but I am still stuck on loadBytes().
    So at this point, I am blocked on loadBytes() and my performance for a simple app which draws a few Bitmaps and MovieClips is terrible.  I am hopeful some people out there have figured out some solution (there are lots of clever people out there) and I will stumble on to something.  But being forced to go native Objective-C seems to be my only option at this point.
    In summary, here are the questions I would like to ask the Adobe/Flash group for some more help/information/advise:
    - Why is Loader not allowed on iOS?  Is it a technical limitation of the hardware/os/Flash?  Will it never be supported?  What is the future of this class on iOS?
    - Why is loadBytes() not allowed on iOS?  I have the raw embedded data in memory.  I don't need to make a remote call so security should not be an issue.  Can I create a MovieClip without using Loader?
    - Why is AS3 stripped from the timeline when a Symbol is retrieved using [embed]?  Maybe this is the same reason loadBytes() fails, but if I could use [embed] and get a copy of the Symbol, that is what I need.  (There are issues with the mx.core.MovieClipLoaderAsset/Asset, but it is better than being blocked by loadBytes())
    - What are some apps you guys have written that we can use to compare PC vs iOS?  Again, a "tech demo" or sample code of what you as experts in Packager for iOS have done which runs at decent framerate (30+fps) would be of tremendous help.  If the Adobe/Flash group hasn't gotten the current Packager for iOS to handle more than 50+ 2D Bitmaps on screen running at 30+fps, that would be good to know.  Please let us know what the experts and owners of your software are capable of getting the most throughput using the Packager.  I'd hate to sound a bit fed up/angry, but I think you are wasting a lot of people's time and energy with a piece of software that, to me, seems like it was a bit early to release.  Flash can do some great things.  If it can do it on iOS, even better.  But PROVE it to us that it's possible, before having your customers run into barriers imposed on us by trial and error.
    Thanks.

    I have hardly ever seen a post here from someone at Adobe, so you may need to be patient.
    Read this article, and get its associated demo files, to see some good performing tech demos:
    http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html
    Back to your main point, loaders are working, what isn't working for you is accessing of things in the library of a successfully loaded swf, that have been set to Export for ActionScript. That means that the swf you have loaded has an ActionScript Class, to represent the library symbol. iOS Flash apps are native ARM code, and don't include the virtual machines that a browser plugin has, and so it's not able to interpret ActionScript. That may be why it would fail.
    Now, I can think of at least a couple of reasons why you might want to have external swfs with elements that you want to reuse in the main swf. One would be if you're intending to make a lot of them, like say if you wanted to have an Asteroids game and the ability to use artwork from a set of different swfs. Another reason might be if you want to skin your interface, by taking specific elements from the loaded swf and using them in the main swf. That way you could have artists preparing those swfs for you, and you just include them in your package, and load the one you want.
    There is a way to do either of those things. The second one can be done by having the item as a named symbol on the stage of the loaded swf. With a to-be-loaded swf named "inner.swf", that has a movieclip on its stage named "mc1", this script in the main swf would load that external swf and use its symbol on the main swf's stage, without having to make the inner swf's symbol use ActionScript:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    For the other case, you can take the item off the stage of the loaded swf and draw it into a bitmapdata, and then make as many bitmaps from that as you like. Here's the above example, only it adds the original movieclip to the main swf stage, and also creates a bitmap that looks the same:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    var bmd:BitmapData = new BitmapData(innermc.width,innermc.height);
    bmd.draw(innermc);
    var bm:Bitmap = new Bitmap(bmd);
    bm.x = 150;
    bm.y = 150;
    addChild(bm);
    So, the thing to learn is that a native ARM code application does not have an ActionScript interpreter in it, and if you need to do something that normally requires interpreting ActionScript, find another way to do it.

  • Loading an external swf into my parent swf?

    Does anyone know how I can load an external .swf file into my
    parent file? I have tried to use loader actionscript but think I am
    using the incorrect script or putting it in the wrong place? If
    anyone can tell me the script and where to/how to use it that would
    be amazing? Thanks

    thanks GWD!
    I am using the unloadMovieNum(); command, i have loaded the
    child into level 5 of my parent swf. the parent has multiple scenes
    this one with a layer with a stop(); action and another layer with
    the loadMovieNum("portfolioone.swf", 5); script. it loads the child
    perfectly. The child has a number of pictures in it and a back
    button at the end. I have been adding the
    on (release) {
    unloadMovieNum(5);
    script to the button which unloads the child but stops
    because of the stop action in the first frame of the particular
    scene within the parent. I want to be able to add a script to this
    button which will take me back to a labeled frame in a particular
    scene of the parent, I tried the this.removeMovieClip(); but
    doesn't seem to be working for me, Thanks for the reply, hope you
    can help me further??

  • Unloading external swf file keeps memory usage growing up

    Hello everybody,
    The idea is very simple: I have a submain.swf with 5 buttons. Each button loads an external .swf file.
    com_loader.load(URLRequest);
    After playing first external swf, before I go to next one, I try to unload it:
    1. remove all its associated listeners:
    com_loader.contentLoaderInfo.removeEventListener(Event.INIT-PROGRESS-COMPLETE, idFunction);
    2. unload it:
    com_loader.unload();
    3. set to null:
    com_loader = null;
    and load next external swf file and so on.
    The problem is that the FireFox/IE8.0 Memory Usage in Task Manager is going up and I see no sign of GC activity even after 5 mins of playing. Can anyone light me up pls? This is the second week working around and no good news until now.
    Thanks in advance.
    P.S.
    If I try com_loader.unloadAndStop(); it gives me the error: Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
    Vince.

    Hi Ice,
    The loaded swf file contains only a small photo, just for testing, with no listeners or other stuff in it.
    Vic.

Maybe you are looking for

  • Jsp-file="/WEB-INF/index.jsp" cannot load

              Hi,           I am defining a servlet in the web.xml file using the following syntax.           <servlet>           <servlet-name>TestServlet</servlet-name>           <jsp-file>/WEB-INF/index.jsp</jsp-file>           </servlet>           Th

  • Regarding displaying unicode

    Hello javaGurus! <Please Help me regarding displaying unicode> I am new to javaInternationalization, Till now i studies. Java Internationalization tutorial at http://java.sun.com/docs/books/tutorial/i18n/index.html and understand basic Structure. I h

  • Problem in converting util date format to sql date format

    im trying to convert util date to sql date...i'm getting the error msg as Error is : java.lang.NullPointerException Error Message : null i'm not bale to track the result...whatz the problem with this code? This fromDate value will be dynamically buil

  • Is it possible to integrate Nokia E62 with Cisco Call Manager 4.x?

    The Nokia E-61 can be integrated with Cisco Call manager 4.x using a Nokia Call Connect 1.0 client. 1.Is it possible to do the same with Nokia E62.If it can be done,what would be the requirements? 2.Is Nokia E-62 PDA a Cisco Compatible Extension devi

  • X-fi Remote in

    I installed the X-fi driver(s) for X64, and it appears everything works fine except the remote. Would I be correct in a assuming Creative does not have 64-bit drivers for the X-fi remote? If yes, where can a get the driver? Are there any 64-bit drive