About loading multiple swfs

Hello folks...
I have some serious problem with loading multiple swfs in a
swfLoader whithin an application...
The problem is that... every time I load another swf in a
swfloader,
the memory that the Internet Explorer uses justs keeps going
up and up
and one time (maybe after 15 - 20 minutes) it just crashes...
To be more specific, my application loads a new swf in a
regular basis (every 30 seconds)
to make it like a slideshow...
and it also has fonts embedded in it
yet to minimize the total memory used by this application,
I've did somthing like this...
var sys:SystemManager = contentLoader.content as
SystemManager;
if (sys && sys.numChildren>0) {
sys.removeChildAt(0);
contentLoader.content.loaderInfo.loader.unload();
contentLoader.source= DisplayManager.convertToAppSWFName (
subAppID );
and every application has an removedEventHandler which
listens to removed Event,
and removes all listeners registered to it when it is removed
from this display list..
So I'm very curious why the memory usages just keeps
rising...
If you have any hints, they'd be greatly appreciated...
Thanks in advance!!!!

Loading external swf containing code (even a single stop() !) is not allowed on iOS...

Similar Messages

  • Loading multiple swfs using air 3.6 for ios

    Adobe, can you please provide us with the code to load multiple swf files for ios. Please provide examples. The code below loads multiple swfs, but the swfs stall, so this does not seem to be a solution.
    Code description: A flash file made up of 4 frames with forward and back buttons that navigate from frame to frame. The code loads three different swf files in frames 2, 3 and 4.
    Frame 1:
    var myLoader:Loader;
    var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
    if(myLoader == null){myLoader = new Loader(); addChild(myLoader); }
    else {myLoader.unload();}
    Frame 2:
    myLoader.unload();
    myLoader.load(new URLRequest("file1.swf"),loaderContext);
    Frame 3:
    myLoader.unload();
    myLoader.load(new URLRequest("file2.swf"),loaderContext);
    Frame 4:
    myLoader.unload();
    myLoader.load(new URLRequest("file3.swf"),loaderContext);

    I've just tried loading, unloading and then loading again same SWF with 2 library objects linked for AS3 export. It worked both on simulator and on device in debug mode. When I look inside swf it does contain AS3 code.
    So is my swf a pure asset SWF? Or Intellij Idea 12 that I'm using does stripping automatically?
    And then I've read your comment at http://forums.adobe.com/message/5217325#5217325 and run 'swfdump' utility on my .swf file. Looks like there's no ABC2 code, that's why app was able to load, unload and load again the same swf.
    public dynamic class net.games.bg extends flash.display.MovieClip
      native public function bg():*;
      native public var one:flash.display.MovieClip;
      native public var three:flash.display.MovieClip;
      native public var two:flash.display.MovieClip;
    public dynamic class net.games.z1 extends flash.display.MovieClip
      native public function z1():*;
    I can access objects as instances through root  or as objects through getDefinition.
    private var aLoader : Loader;
    private function init():void
                load1();
            private function load1():void
                aLoader   = new Loader();
                var url:URLRequest = new URLRequest("levels/expirementlevel1.swf");
                var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
                aLoader.load(url, loaderContext); // load the SWF file
                aLoader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, handleSWFLoadComplete1, false, 0, true);
            private function handleSWFLoadComplete1(e:flash.events.Event):void {
                var levelObjectsMC:flash.display.MovieClip = e.target.loader.content;
                for (var i:uint = 0; i < levelObjectsMC.numChildren; i++){
                    trace ('\t|\t ' +i+'.\t name:' + levelObjectsMC.getChildAt(i).name + '\t type:' + typeof (levelObjectsMC.getChildAt(i))+ '\t' + levelObjectsMC.getChildAt(i).x);
                var LibraryClass:Class = e.target.applicationDomain.getDefinition("net.games.z1") as Class;
                var myLibraryObject:flash.display.MovieClip = new LibraryClass as flash.display.MovieClip;
                trace(' load 1 ' + myLibraryObject);
                aLoader.unload();
                load2();
                //addChild(levelObjectsMC);
            private function load2():void
                aLoader   = new Loader();
                var url:URLRequest = new URLRequest("levels/expirementlevel1.swf");
                var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
                aLoader.load(url, loaderContext); // load the SWF file
                aLoader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, handleSWFLoadComplete2, false, 0, true);
            private function handleSWFLoadComplete2(e:flash.events.Event):void {
                var levelObjectsMC:flash.display.MovieClip = e.target.loader.content;
                for (var i:uint = 0; i < levelObjectsMC.numChildren; i++){
                    trace ('\t|\t ' +i+'.\t name:' + levelObjectsMC.getChildAt(i).name + '\t type:' + typeof (levelObjectsMC.getChildAt(i))+ '\t' + levelObjectsMC.getChildAt(i).x);
                var LibraryClass:Class = e.target.applicationDomain.getDefinition("net.games.z1") as Class;
                var myLibraryObject:flash.display.MovieClip = new LibraryClass as flash.display.MovieClip;
                trace('load 2 x ' + myLibraryObject.x);
                aLoader.unload();

  • Flash player 10.3.181.14 broke my site, loading multiple swfs into an array

    I load multiple swfs into an array, I add and remove the objects on the stage, this is for a rotating carousel.
    All the items locations are established in xml. If I only have one item loaded into the array it works fine, if I have more then one it will not a) play the swf, or b) show the swf.
    The swfs themselves contain code that fire events in the main container. Which cause other items to play or load.
    Is anyone else having this issue?

    Hi howet,
    EDIT:
    I've opened a flash bug in their bug system as I found I could reproduce the issue: https://bugs.adobe.com/jira/browse/FP-7071
    There are some workarounds I found on there.
    ORIGINAL MESSAGE:
    I was having a similar issue using a loading component which i've been using for several years with no issues. As with you the issue arose when loading multiple swfs (or even one swf and then a jpg) on 10.3 and above. It works fine on 10.2 and below still.
    I found a workaround whilst I look for a proper answer and that is to delay subsequent loads using a hacky setTimeout.
    For example:
    protected function manageLoaded (p_event : Event) : void {
    setTimeout(loadNext, 1);
    // following line breaks the gotoAndStop of loaded swfs.
    // loadNext();
    I hope this helps you too, let me know.
    Cheers,
    Dan.
    Message was edited by: Dan Wilkinson, 01/06/2011 11:37am BST (GMT + 1)

  • Load multiple swf play one by one when required

    Dear Friends,
    i want to Load multiple swf play one by one when required, i mean, i want to reduce the loading time, so i cut my swf in to 2 portion, load both same time or load 2nd while 1st one playing and how can i show the 2nd one when first one finished?
    Thanks in advance,
    Regards,
    Syed Abdul Rahim

    see i write code for you may be it will helps you
    var vidno:int=1
    var totalvideos:int=10
    var ld:loader
    function loadvideo(str:String)
    addChild(ld)
    loader.load(urlrequest(str))
    loader.contentLoaderInfo.addEventListener(Event.Complete,loadnext)
    function loadnext(event:Event):void{
    removeChild(ld)
    if(vidno<totalvideos){
        vidno++
         loadvideo('vid'+vidno+'.swf')
    loadvideo(vid1.swf)
    try it..

  • Loading multiple swf's in runtime and playing them one after other

    Hi,
    I am looking for help in loading multiple swf's as a playlist and playing them one after other on top of the other, so here even we have to play with display list for the visiblity.
    Tried to load single files but not getting for multiple files, what will be the event with which the dynamically loaded swf switch to other.These file names will be mentioned in XML file.
    Please let me know your thoughts and will be greatfull if anybody can help with the script or any kind of tutorials.

    Hi,
    First of all am thanking you for showing your kind intrest towards this thread, and appreciate for spending time to work out this issue.
    I will explain you in deatil the issue what am facing,I am working on a project where basically dealing with flv player and videos, am trying to play multiple flv videos of a 3d human character who is speaking out a number like 3550.
    Here we are using multiple video files and joining them like videos where character says 3 then 1000 then  5 then 50.
    The issue here is after every video there is a fraction of second where the character is disappearing from the stage which we can't afford because all the numbers have to be played at once to show it as one single digit.
    So thought of trying swf's instead of flv so that we can omit the gap between the numbers, but even in this swf's also having same issue for a fraction of second the character is missing from the stage.
    I am looking for a solution to this, either the way can work out as flv or swf.For flv am trying to edit some player where we can remove the delay between the clips.
    I am attaching new swf where the character is speaking 3 numbers like 3,1000,40.You can notice there is a flicker between the swf's.
    Can we use Display list with which we can omit that gap.
    Looking for your thoughts and help.
    Thank you

  • Loading multiple SWFs and storing them (code not working under Firefox 23 and Chrome)

    Hey guys,
    Anyone has any idea why this code suddenly don't work anymore? (It works under internet explorer but not firefox and chrome
    The code under is placed on my main swf to preload all my external swfs and store them for not having to wait too long to access them.
    Thx guys.
    I took the code from here btw: http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs#snippet
    I'm running flash player 11.8.800.94... It used to work under Firefox and Chrome
    var _swfLoader:Loader;
    var _swfRequest:URLRequest;
    var _swfPathArr:Array = new Array("00.swf", "01.swf", "02.swf");
    var _swfClipsArr:Array = new Array();
    var _swfTempClip:MovieClip;
    var _loadedSWFs:int;
    startLoading(_swfPathArr);
    function startLoading(pathArr:Array):void {
    _swfLoader = new Loader();
    _swfRequest = new URLRequest();
    loadSWF(pathArr[1]);
    function loadSWF(path:String):void {
    setupListeners(_swfLoader.contentLoaderInfo);
    _swfRequest.url = path;
    _swfLoader.load(_swfRequest);
    function setupListeners(dispatcher:IEventDispatcher):void {
    dispatcher.addEventListener(Event.COMPLETE, onSwfComplete);
    function onSwfComplete(event:Event):void {
    event.target.removeEventListener(Event.COMPLETE, onSwfComplete);
    _swfTempClip = event.target.content;
    _swfTempClip.customID = _loadedSWFs;
    _swfClipsArr.push(_swfTempClip);
    if(_loadedSWFs <_swfPathArr.length - 1) {
    _loadedSWFs++;
    loadSWF(_swfPathArr[_loadedSWFs]);
    } else {

    Hi kglad,
    The problem was coming from my server.
    I recently played with some settings  from a "cache control tool" offered by my hosting but i thought i had it back at default. Turns out i must've missed something. Now i have the .html caching on and everything works good on all browser.
    I have another question tho...
    I'd like to know if there's a way to cache an html file without having to ask my hoster to cache all of my htmls...
    I'm using this code now but maybe there's a way to add something that will cache this page specifically?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>title</title>
    <script language="javascript">AC_FL_RunContent = 0;</script>
    <script src="fluid_site.js" language="javascript"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen"/>
    </head>
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet -->
    <script>
        if (AC_FL_RunContent == 0) {
            alert("This page requires fluid_site.js.");
        } else {
            AC_FL_RunContent(
                'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                'width', '100%',
                'height', '100%',
                'src', 'index',
                'quality', 'medium',
                'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                'align', 'middle',
                'play', 'true',
                'loop', 'true',
                'scale', 'showall',
                'devicefont', 'false',
                'wmode', 'window',
                'id', 'index',
                'name', 'index',
                'menu', 'false',
                'allowFullScreen', 'false',
                'allowScriptAccess','sameDomain',
                'movie', 'index',
                'salign', ''
                ); //end AC code
    </script>
    <body>
    <noscript>
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="100%" height="100%" id="index" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <param name="MENU" value="false">
        <param name=wmode value=window>
        <param name="movie" value="index.swf" /><param name="quality" value="medium" /><embed src="index.swf" quality="medium" width="100%" height="100%" wmode="direct" name="fluid_site" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object>
    </noscript>
    </body>
    </html>
    Thanks

  • How to load multiple swfs to my main flash file??

    I am using the following code
    In actions for Frame 1:
    var myrequest:URLRequest=new URLRequest("A.swf");     
    var myloader:Loader=new Loader();
    myloader.load(myrequest);
    img1.addEventListener(MouseEvent.CLICK, clickButton);
    function clickButton(event:MouseEvent):void{               
        stage.addChild(myloader);
    img1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);
    function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
         gotoAndStop(13);
    In action for Frame 13:   (img2 is another button)
    img2.addEventListener(MouseEvent.CLICK, unloadFunction);
    function unloadFunction(event:Event):void{
         stage.removeChild(myloader);
    This code works perfectly fine. My only problem is, How do I get multiple swf loaded. When I tried to copy and paste the same code for the other swf, but the following errors appear. I'm pretty sure theres a way to have multiple swfs (btw the multiple swfs will be linked from different frames).
    Scene 1, Layer 'PAGES!', Frame 2, Line 7 1021: Duplicate function definition.
    Scene 1, Layer 'PAGES!', Frame 2, Line 2 1151: A conflict exists with definition myloader in namespace internal.
    Scene 1, Layer 'PAGES!', Frame 2, Line 1 1151: A conflict exists with definition myrequest in namespace internal.
    Can someone please help me with this. Thanks

    You define the same variable or function names more than once in a file.  But you can reuse them in other frames.  Try something more like the following in frame 2....
    myrequest=new URLRequest("A.swf");     
    myloader.load(myrequest);
    leave all of the rest out for starters... the same function from frame 1 can be re-used without rewriting them.  I don't know what the deal is with img1, but if you need to change what it does, then add that back in.

  • Question about load external SWF

    Hi people!
    I've been trying to load an external SWF into my app. I need
    to load a Fusion Chart's Gantt Chart, but I didn't achieve.
    Fusion Charts are embed using the attached JavaScript code.
    How can I load this SWF into my app? Should I use ExternalInterface
    to do it?

    You would need to use SWFLoader, Image or Loader to load your
    swf into Flex. To interact with it, you would most likely need to
    use SWFLoader/Loader so you could make calls into the SWF. This is
    somewhat of an advanced topic and a common question, so you should
    be able to find more complete answers if you search the forums for
    these.

  • HELP! How to load multiple swfs using the following code?

    In actions for Frame 1:
    var myrequest:URLRequest=new URLRequest("A.swf");     
    var myloader:Loader=new Loader();
    myloader.load(myrequest);
    img1.addEventListener(MouseEvent.CLICK, clickButton);
    function clickButton(event:MouseEvent):void{               
        stage.addChild(myloader);
    img1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);
    function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
         gotoAndStop(13);
    In action for Frame 13:   (img2 is another button)
    img2.addEventListener(MouseEvent.CLICK, unloadFunction);
    function unloadFunction(event:Event):void{
         stage.removeChild(myloader);

    do you want to load another swf (eg, B.swf) when you're in frame 13 and img2 is clicked?  if yes, and you don't want A.swf to continue to play, use:
    //In action for Frame 13:   (img2 is another button)
    img2.addEventListener(MouseEvent.CLICK, loadF2);
    function loadF2(event:Event):void{
        myloader.load(new URLRequest("B.swf"));

  • Loading multiple swfs

    I need to have many movieClips and load them from an external
    swf. I can make that work using a movieClipLoader, but I need to
    gotoAndStop on a different part of the loaded movieClip timeline
    for each loaded instance. What's the best approach?
    Multiple loaders?
    Thanks,
    Paul

    Use a ViewStack (or perhaps a Canvas - it depends on what you
    are trying to achieve).
    For the ViewStack solution you'll need a container for each
    SWF (such as Canvas or HBox). Into each one, use SWFLoader to bring
    in the SWF.
    For the Canvas solution, just use SWFLoader and set their x
    and y positions so that they are on top of each other the way you
    want them.

  • Another loading multiple swfs question

    I have been trying endlessly to find a solution for a problem. All I want to do is to be able to load a loader container on to the stage and swap out each swf by hitting the corresponding btn. I found a code to do this and it works on static swfs but when I link xml photogallery swfs to  it I get all kinds of output errors but the functions work in a browser. I know it is the code as I have tried 4 different kinds of xml photo galleries and all return similar output errors.
    I know this is a bit of a pain in the @#$ but if someone could have a look at the zip file in the link below which contains a main.swf, an swf folder and one swf inside including all the xml. You will see what I mean. What I really need to acomplish is to have a set AS3 code for doing this, I'm sure a seasoned AS3 pro could look at the code in the file and see why I get the errors or I'll even settle for a code that works. I'm the kind of person that likes to know why something doesn't work and when it works I like to know how as well. This is one of the reasons I've been knocking myself out for days as you will see posts of mine about this. Learning AS3 the hard way on trial and error has it's good points as I know alot more now than I did a week ago, but I could really use some help here.
    zip file link is here
    http://www.mediafire.com/?mzujrhz2mgj
    anybody?
    rdesd

    Loading external swf containing code (even a single stop() !) is not allowed on iOS...

  • Load multiple swfs sequentially

    Hi
    I'd like to split a long movie (about 10mb) into a series of 5 or so swfs. The idea is that only the first movie would need to pre-load and then subsequent swfs would play seamlessly in sequence (so each swf loaded in turn as preceding swfs play). Can kind person provide some insight on the best way to achieve this? Is it very complicated to do? Is this the way that the cs5 trailer on the Adobe.com homepage has been put together?
    Many thanks in advance

    Hi,
    thanks for your reply.
    I know duration of each SWF file. Is it possible to say that
    after this time the second SWF should go and so on. If so please
    tell me how to do it by code.
    Thanks again.

  • Loading multiple SWFs across many pages in a Flash interface

    I have a Flash AS3 interface that lets users go tto different
    pages with the usualy back & next buttons. Each page they come
    to loads in a page-specific XML file with content, and then
    possibly graphic files and/or SWF files.
    My question is this: When a user happens to quickly click the
    next page button, they will gte each page to start loading its
    assets. I believe that this would cause pages that they didn't
    soend more that a fraction of a second on to continue loading in
    the background. So if they quickly click through 20 pages, all 20
    pages' assets are loading. Sounds like I have a bad design on my
    hands!
    Without designing/developing for it, is this the simple
    result of loading in a file to Flash? Should I look into stopping
    iles from dpownloading if a user leaves a page before it's fully
    downloaded? Is that even possible?
    Any thoughts or advice would be greatly appreciated!

    I have a Flash AS3 interface that lets users go tto different
    pages with the usualy back & next buttons. Each page they come
    to loads in a page-specific XML file with content, and then
    possibly graphic files and/or SWF files.
    My question is this: When a user happens to quickly click the
    next page button, they will gte each page to start loading its
    assets. I believe that this would cause pages that they didn't
    soend more that a fraction of a second on to continue loading in
    the background. So if they quickly click through 20 pages, all 20
    pages' assets are loading. Sounds like I have a bad design on my
    hands!
    Without designing/developing for it, is this the simple
    result of loading in a file to Flash? Should I look into stopping
    iles from dpownloading if a user leaves a page before it's fully
    downloaded? Is that even possible?
    Any thoughts or advice would be greatly appreciated!

  • Flash app loading multiple swfs

    Hi ...
    I am having to fix a load problem with our Flash app. The
    current code loads in 3 to 4 swf's (100 to 300 kb in size) into the
    main swf and the same time. Should the swfs be loaded sequentially
    or is ok for them to be loaded all at once?
    Thx

    Loading external swf containing code (even a single stop() !) is not allowed on iOS...

  • AIR 3.7 Problem Loading Multiple Similar SWFs On iOS

    I'm running into an issue with loading multiple SWFs using AIR 3.7 on iOS. The exact same code works fine on Android.
    The issue is that if I include 2 specific SWFs then neither of them will load correctly. When I include just one of the SWFs it works great. I've also tried including a second SWF which is pretty much empty and that also works. Additionally, I've been able to load a MovieClip out of the first SWF IF addChild() was first used on myswf1 and that works even when the main SWF did not. Lastly if I include 2 of the exact same SWFs (with different filenames) that also works.
    So my question is what is it about the two SWFs that causes it not to work? They are effectively the same except each has custom assets and custom class naming.
    Both of them subclass off one main class like this:
    class myswf1 extends mymain
    class mymain extends MovieClip
    class myswf2 extends mymain
    class mymain extends MovieClip
    So both SWFs contain mymain seperately from each other. Could that be the issue? Like when it compiles all the code into the package SWF the
    two mymain root classes clash?
    In the past it seems like that should still work it just uses the first loaded class and that is it.
    The errors that I get seem to happen on lines like this:
    selectableHudOptions.bonustime.mouseEnabled = false;
    Where selectableHudOptions.bonustime is basically null. However, when I just have 1 SWF this line works fine.  If I loop through selectableHudOptions's children it is blank when I am loading the two SWFs but it shows all of the children when just loading the one SWF.
    Another theory I have about it is that it seems like addChild() has to be used on the objects and frames have to go by before the children are visible. Like addChild() is being delayed somehow because of the multiple SWFs. Or addChild() is behaving asyncronously and my code is running syncronously.
    I think Nimisha from Adobe has worked on these multiple SWF issues before.

    Yes, duplicate symbol conflict looks like the cause of your issue.
    This is a known issue in AOT mode. For now, could you please try renaming mymain to something else when using it in the second swf?
    Or you may place mymain into separate swc, and link one of your swfs with "merged into code" option, while the other one "externally", so that only one of the swfs has mymain defined and there is no clash.
    Please do let us know if either of the solutions work for you.

Maybe you are looking for

  • Dunning form F150- Telefon/fax/mail printing for 1 user and not for other

    Hello expert, This is regarding the printing of the dunning form using F150.  At first, using company code and account clerk (BUSAB), we retrieve the user id.  The program uses FM BAPI_USER_GET_DETAIL to get the address details of this user id.  The

  • XML file not generating Completely

    Hi , I am reading a file from the Application Server of XML format in Binary Mode. After reading I am checking the contents and with every 255 Char I am appending the contents in the different row, thus creating a internal table having one field of l

  • Opening attached .pdf and .doc files

    I am having a mental moment and can't figure out how to (attach to button) import .pdf or .doc files so that they open when the project is published. The buttons are linked to files on my computer...when I publish, Captivate knows the files are there

  • Macbook crashing when plugged in

    I have a 2008 black macbook and everytime im using the computer and its plugged in charging the machine seems to crash, the machine seems to run fine when not plugged in? very weird i am using a 60W Magsafe Charger

  • Found Bug in PS5 - some linked items don't get moved or rotated together!

    Noticed a design flaw in PS5/(99% likely in 5.5, 90% likely in PS6). If you link layers with together, and on those layers are linked vector masks, then if even  though the layers and masks are all linked together, if you select the "Move Tool", to e