Loading multiple SWFs and saving them (code works is not under Chrome and Firefox 23)

Hey guys,.

Anyone has an idea why this suddenly does not work? (It works under internet explore but not firefox and chrome)

The code below is placed on my main swf to preload all my external swf and store them for not having to wait too long to get there.

Thank you guys.

I took the code by btw: http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs#snippet

I am running flash player 11.8.800.94... He 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 {}



//

}

};

I have no problem with ff and I don't see any problem in chrome.

You probably have a typo in if:

loadSWF(pathArr[1]);

should be

loadSWF(pathArr[0]);

Tags: Adobe Animate

Similar Questions

  • loading multiple SWFs with addChild without blinking in the meantime

    I have a shell that pulls in a swf Flash file.  When you click the next button, it takes in the next swf file.  I have numbered the swf files so that they to 1.swf, 2.swf, etc..  Everything works fine except their this blinking between removing the old swf and bringing in the new.  Right now I'm going to load them in an existing moveClip called 'clipsMC '.  I'm guessing that there is a split second where the old swf is removed and a new charge.  I need to execute smoothly overall, however, for some type of listener to ensure that it is loaded before removing the old?  Here is the part of the code that I have to bring:

    function loadSwf()

    {

    clipNum = clipVar + ".swf"; creates the SWF file name... works

    var url: URLRequest = new URLRequest (clipNum);

    removeSWF();

    myLoader.load (url);

    clipsMC.addChild (myLoader);

    }

    function removeSWF (): void

    {

    If (clipsMC.numChildren! = 1).

    {

    myLoader.unloadAndStop ();

    clipsMC.removeChild (myLoader);

    }

    }

    If you use the Loader class, then you use the contentLoaderInfo property.  The help documentation should provide enough information in its use.  Use of it would be almost along the lines of...

    myLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, processLoadedContent);

    where processLoadedContent is replaced with the name of any function you create an event handler.

    You can also use a Loader object if you reparenting the content of the loader for a Sprite or a Movielcip.  You can keep the invisible charger so that it acts only as a loading mechanism and not a displayed object.

  • Load external .swf and button top

    Hello!

    I have a problem here! I want to load a file (created from inDesign) external .swf and then on load a button at home (a small image that I created with the name "home_btn"), which refers to my home page to say frame 90

    Any help it would be greatly appreciated,

    Frank

    I founded by myself, I just create a clip of this button and this is my code in case anyone has the same problem...

    import flash.events.MouseEvent;

    import flash.display.Loader;

    import flash.net.URLRequest;

    var loader: Loader = new Loader();

    Loader.Load (new URLRequest ("MyInDesignSwf.swf"));

    addChild (loader);

    addChild (home_front);

    home_front.addEventListener (MouseEvent.Click, playClickedExit)

    Stop();

    function playClickedExit(event:MouseEvent):void

    {

    removeChild (loader);

    gotoAndPlay (90);

    }

  • HTML code works is not in 2015.2

    Hello world.

    I am a novice, so sorry in advance if I should know better...

    I have a HTML code integrated into my website. The code just Knack, a company of the database online. The code allows the Viewer to query the database and see customized results.

    The code worked perfectly fine in 2015.1

    Since the conversion of 2015.2, the code does not work on pages where there is Adobe already existing elements (for example a master page with header, navigation).

    The code works in 2015.2 If the page has nothing on it, but the HTML object (do not use a master page, only a fresh white page).

    I contacted Knack and they provided the following explanation of the problem with a suggestion to meet here for a solution.

    Below, I have send the Knack email with a screenshot of the error codes and a description of the issue from their end.

    Looking for Muse experts help to solve this problem and get my site up and running! Thank you is advanced.

    Greg

    KNACK...

    I've heard of our engineers - the problem is that your application cannot load the JavaScript of Muse libraries with your app integrated Knack (see image with errors below). Could you join Muse and see how you might be able to download these JS files manually on the server that hosts your site, since talent may not get back them? I would like to send the image in your message.

    Hello Dana,.

    I've just updated to this version, and now I can't copy anything, given that the program crashes.

    It goes at a bad time... haha

    Thank you!

    Best,

    Frine

  • Dash shortcut keyboard code works do not?

    Work on a new website, I started to work on my old laptop (macbook white) with Dreamweaver 5.0 is installed. When it got too complex for the small screen, I took the project to my work computer (Mac Pro) and continued his work in Dreamweaver CC. On both computers, the shortcut for "exit code" works as advertised in the help files.

    Tonight, I took the project back home and continued to work on my new laptop (MacBookPro 17 "). On this laptop I have had installed CS6 so I continued to work on the CS6. But for some reason any keyboard shortcuts for 'code removal' didn't work. There is no shortcut behind these commands in the Edit menu. I found this very annoying, so I installed CC on this laptop too. After installation, I took the prefs on the cloud and expected shortcuts keyboard to work, but luck bo...

    I then quit Dreamweaver, replaced the file Shortcut.js keyboard with my Mac Pro. Still no go.

    My work computer running OS x 10.8, my two laptops run OS x 10.9. Therefore, if a shortcuts are somehow reserved by the system, I guess they should not work on my old laptop.

    Any suggestions?

    Thank you


    A

    Judge that there is no shortcut associated with these orders. I tried to add shortcuts, but that doesn't work anymore. I select the command, click the + and press the desired key combination (shift + command + >). The window disappears. Probably because the ">" is also the "." and '-command.' is the abbreviation for "Cancel"...

    I did some more digging and found the shortcuts are stored in the Menus.xml file, buried deep in the folder Application Support/Adobe etc. But this file is only there after making a duplicate of the original keyboard settings. I opened this file (in Dreamweaver) and found that the shortcuts for dash/raise the code are here, but for some reason any that is ignored by Dreamweaver. I removed Dreamweaver of the computer and re-installed, no chance.

    I made a new set, has opened the new xml file and first removed the shortcuts, save the file, added shortcuts and saved again. Now they work.

    But still, I would like to know why he didn't in the first place...

  • Theme Aero works do not mistake "Desktop Windows Manager is disabled.

    Original title: Troubleshoot Aero gives weird error
    I want to activate Aero so I can have all the cool kids stuff xD

    OK, we'll take it seriously. I tried to activate Aero but Windows Ultimate 7 x 64 won't LET me. I ran the resolution of the problems in the hope of transparent windows, but it gives "Desktop Windows Manager is disabled" every time. I ran Services.msc and it already works! I restarted the service, and the same error comes back. DWM.exe is running in Task Manager, too. I have closed that, started the service, always error.

    Can someone please? Intel Core 2 Duo T5300, 1.73 Ghz, 3 GB RAM, SiS Mirage 3 IGP with 256 MB shared memory.

    Hello

    Please proceed to a repair facility.  Here are the steps to support...

    Please proceed to a repair of the OS installation.  In case of failure, please make sure that you back up your data to an external location before performing the repair.  Here are the steps to proceed with the repair.

    To start the repair facility, load Windows 7 and make sure that you are connected to an administrator account. Then, insert the Windows 7 DVD and run the file setup.exe from the menu autoplay:

    Then click install now to start the process:

    Now, uncheck the box "I want to help improve Windows ' and select the optionto go online to get the latest updates for installation :

    The installation process will then search online for available updates, which may take a few moments. Once complete, read the license agreement, then checkthe box I accept and click Next:

    Now, click on the box to upgrade to start the Windows 7 repair facility:

    Windows will then be re - install Windows 7 over itself and you will be informed of its progress as it does. Your PC will reboot a couple of times during this proc

    Once restarted, you are then prompted to enter details of the usual initial installation (for example, the license key, location and time settings). When it is finished, the repair facility was conducted entirely.

    Thank you

    Aaron
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • huffingtonpost.es/com does not correctly load in safari (and firefox), but he does it in chrome

    I have problems loading of the huffingtonpost.es and sometimes .com on Safari on my mac and also in Firefox. But the web even chrome load perfectly.

    It is the only web that I have problems up to now and is not a related problem of expansion because I don't have extensions in firefox and the same problem occurs there.

    Does anyone have an idea of what's going on? It seems that something in relation to the css.

    The really strange thing is... I try to load huffingtonpost.com on safari and do not load correctly, I reload and reload and does not load correctly. Then I load in loads of Chrome perfectly and after that I try to load in safari (or firefox again), then load it. :-/ This does not always happen, but then sometimes drive me crazy.

    Thanks for any help in advance.

    Make sure your OS X software is up-to-date.

    Click on your Apple  top left of your screen.

    In the drop-down menu, click on: software update

    That should launch the App Store.

    If you see an update for OS X El Capitan and Safari, install these updates, restart your Mac and try Huffington Post on Safari and Firefox.

  • Gamepad not working do not under Vista

    My Windows Vista loaded and runs MS Combat Flight Simulator V1 OK using the keyboard, in 'settings' program, he recognizes the joystick for calibration but joystick doesn't work just not in the game itself. I tried this fix below - but no luck. Any other ideas please?

    If you upgrade to Windows Vista, one of the things that you may find is that your older programs works under Vista. Many software publishers are working to release Vista compatible versions, but in the meantime, you can try running in Compatibility Mode applications.

    To do:

    1. open Windows Explorer.
    2. Locate the executable file of the application.
    3. right click on the executable, and then click the properties option.
    4. Select the Compatibility tab.
    5. Select run this program in Compatibility Mode option.
    6. in the drop-down list, choose the operating system that you ran before upgrading to Vista.
    7. If necessary, select run the program as administrator.
    8. click on OK.

    Hello

     
     
    What is the brand and model of the gamepad?
     
     
    I suggest the following steps and check for the device.
    a. click the Start button.
    b. click Control Panel, open game controllers.
    c. click on your game controller, and then click Properties.
    d. on the Test tab, test the game controller to verify functionality.
    If this does not help, you can follow the steps in this article mentioned below:
    http://support.Microsoft.com/kb/831361
    (Valid also for all Microsoft games)
     
     
    See also:
    The problems of gamepad:
    http://support.Microsoft.com/kb/811463

  • Silverlight version 5 does not work with Internet Explorer, Chrome or Firefox

    I have the latest version of Silverlight and have downloaded for Internet Explorer (10), Chrome (27) and Firefox (21). However, it works with any of these browsers. It took me a long time to download and get Silverlight working with these browsers in the past, and at different points in time, he has worked on all of them (some months ago). At one point, he worked on IE and Chrome at the same time too. In order to get Silverlight working in the first place, I had to make some changes to hkey. I am running Windows 7 64-bit on an HP with a processor intel core i7. IE is 64-bit, Firefox and Chrome are 32-bit.

    I tried to watch a movie on Amazon service of instant film, and not a single browser worked with Silverlight. I tried the update of silverlight (for IE), but I have the latest version installed. I kept getting the same error (I think it's mistake 6031). How can I get silverlight to work with at least a browser? Is it possible silverlight needs the hkeys edited again?
    Thanks in advance.

    Hi Yan,

    We get the 6031 error when the integrity of the secure video output connection has been compromised or lost.

    I suggest you to reinstall silverlight by following the steps in the article.

    How to clean a facility damaged Silverlight and then reinstall Silverlight

    http://support.Microsoft.com/kb/2608523

    I suggest you to send the request on Silverlight support forums for further assistance on the issue.

    http://support.Microsoft.com/ph/12929

    Let us know if you have problems with Windows.

  • Load external swf and stopping on the 1st frame.

    Hello everyone

    I use following code to display an external swf file on the iPad.

    var request: URLRequest = new URLRequest ("http://< server ip > / test.swf");

    loader = new Loader();

    Loader.Load (request);

    The file load passes through each image and closes the application.

    Y at - it will be a way to stop the 1st frame once the file is loaded and move between the ribs to the?

    Thank you

    If you listen to when the charger is finished, you can stop the swf file:

    var mc:MovieClip;

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, swfloaded);

    function swfloaded(e:Event) {}

    MC = e.target.content as MovieClip;

    MC. Stop();

    }

    Now you can do what you like in this clip. As:

    mc.gotoAndStop ('some ' label');

    or:

    mc.gotoAndStop (10);

  • load multiple image for just the code in Html5 canvas.

    Hello, help me to solve this problem.

    I have a lot of image in the folder. and I also have a lot of video clip.

    mc_h1, mc_h2, mc_h3,..., mc_h10.

    ask.png

    It's my code.

    img = new createjs.LoadQueue();
    img.addEventListener('complete', completeHandler);
    img.loadManifest([{
      id: "h1",
      src: "images/rambut/h01.png"
    }, {
      id: "h2",
      src: "images/rambut/h02.png"
    }, {
      id: "h3",
      src: "images/rambut/h03.png"
    }, {
      id: "h4",
      src: "images/rambut/h04.png"
    }, {
      id: "h5",
      src: "images/rambut/h05.png"
    }, {
      id: "h6",
      src: "images/rambut/h06.png"
    }, {
      id: "h7",
      src: "images/rambut/h07.png"
    }, {
      id: "h8",
      src: "images/rambut/h08.png"
    }, {
      id: "h9",
      src: "images/rambut/h09.png"
    }, {
      id: "h10",
      src: "images/rambut/h10.png"
    }]);
    var h1 = this.mc_h1;
    var h2 = this.mc_h2;
    var h3 = this.mc_h3;
    var h4 = this.mc_h4;
    var h5 = this.mc_h5;
    var h6 = this.mc_h6;
    var h7 = this.mc_h7;
    var h8 = this.mc_h8;
    var h9 = this.mc_h9;
    var h10 = this.mc_h10;
    function completeHandler() {
    
    
      //add bitmaps
      var bp1 = new createjs.Bitmap(img.getResult('h1'));
      bp1.x = 0;
      bp1.y = 64/3;
      bp1.scaleX = bp1.scaleY =0.23;
      h1.addChild(bp1);
    
      var bp2 = new createjs.Bitmap(img.getResult('h2'));
      bp2.x = 0;
      bp2.y = 64/3;
      bp2.scaleX = bp2.scaleY =0.23;
      h2.addChild(bp2);
    
      var bp3 = new createjs.Bitmap(img.getResult('h3'));
      bp3.x = 0;
      bp3.y = 64/3;
      bp3.scaleX = bp3.scaleY =0.23;
      h3.addChild(bp3);
    
      var bp4 = new createjs.Bitmap(img.getResult('h4'));
      bp4.x = 0;
      bp4.y = 64/3;
      bp4.scaleX = bp4.scaleY =0.23;
      h4.addChild(bp4);
    
      var bp5 = new createjs.Bitmap(img.getResult('h5'));
      bp5.x = 0;
      bp5.y = 64/3;
      bp5.scaleX = bp5.scaleY =0.23;
      h5.addChild(bp5);
    
      var bp6 = new createjs.Bitmap(img.getResult('h6'));
      bp6.x = 0;
      bp6.y = 64/3;
      bp6.scaleX = bp6.scaleY =0.23;
      h6.addChild(bp6);
    
      var bp7 = new createjs.Bitmap(img.getResult('h7'));
      bp7.x = 0;
      bp7.y = 64/3;
      bp7.scaleX = bp7.scaleY =0.23;
      h7.addChild(bp7);
    
      var bp8 = new createjs.Bitmap(img.getResult('h8'));
      bp8.x = 0;
      bp8.y = 64/3;
      bp8.scaleX = bp8.scaleY =0.23;
      h8.addChild(bp8);
    
      var bp9 = new createjs.Bitmap(img.getResult('h9'));
      bp9.x = 0;
      bp9.y = 64/3;
      bp9.scaleX = bp9.scaleY =0.23;
      h9.addChild(bp9);
    
      var bp10 = new createjs.Bitmap(img.getResult('h10'));
      bp10.x = 0;
      bp10.y = 64/3;
      bp10.scaleX = bp10.scaleY =0.23;
      h10.addChild(bp10);
    }
    

    There are so many things by using this code.

    How to simplify this code? If I use my code, slow to load all images.

    Help...

    Well, I was hoping that if I provided 99% of the solution that would be sufficient for you to bring home, but oh well. Try this:

    _root = this;
    this.numbuts = 10;
    this.h = [];
    var i;
    var butman = [];
    for (i = 1; i <= this.numbuts; i++) {
        butman.push({ id: "h" + i, src: "images/rambut/h" + (i < 10 ? "0" : "") + i + ".png" });
        this.h[i] = this["mc_h" + i];
    }
    imgQ = new createjs.LoadQueue();
    imgQ.addEventListener("complete", completeHandler);
    imgQ.loadManifest(butman);
    
    function completeHandler() {
        var i, bp;
        for (i = 1; i <= _root.numbuts; i++) {
              bp = new createjs.Bitmap(imgQ.getResult("h" + i));
              bp.x = 0;
              bp.y = 64/3;
              bp.scaleX = bp.scaleY = 0.23;
              _root.h[i].addChild(bp);
        }
    }
    

    Note that this does NOT create a bunch of h1, h2, h3, etc., but rather a simple table h variables. You don't even really have this table since everything it stores is references to moveclips named sequentially.

  • Loading multiple XML and use

    Hello

    I loaded several files within the table xml

    now, I am unable to use the table xml files

    function onLoaded(e:Event):void
    {
        var xml:XML = new XML(e.target.data);
            myXMLArray.push(xml);
    }
    
    mytexts[textIndex] = myXMLArray[index].set[i].text;
    
    

    I get the error on this

    How can I recover data from XML files saved in table?

    This last line of the code should not run up WHEN onLoaded() runs.

  • Action Script 3 code works does not start and stop button?

    OK so I have what I have created simple animations of a circle that moves from one side of the stage to the other. I have added a new layer and named her buttons. On this layer, I added 2 buttons. One for the beginning and another to stop. The goal is to get my circle to pass from one side of the stage to the other, but be able to use my buttons so that I can start and stop times random animations during playback. I've corrected all my faults of the compiler now the problem is that whenever I click on the start or the stop button, I get an error output. I have a 3rd layer which is called actions and that's where all my code is displayed. I removed this layer and put my code in the first frame of the layer of buttons to see if that would change anything but I still get the same errors of output. So I just added back my layer actions. What could I do it wrong? I made sure to name all of my video clips and buttons correctly and I even added an instance name for them.

    Here is my code and errors I get when I press play and stop button - test

    start_btn.addEventListener (MouseEvent.CLICK, startCircle);

    stop_btn.addEventListener (MouseEvent.CLICK, stopCircle);

    function startCircle(e:MouseEvent):void {}

    Circle.Play ();

    }

    function stopCircle(e:MouseEvent):void {}

    Circle.Stop ();

    }


    green_btn.addEventListener (MouseEvent.CLICK, greenCircle);

    red_btn.addEventListener (MouseEvent.CLICK, redCircle);

    function greenCircle(e:MouseEvent):void {}

    Circle.Play ();

    }

    function redCircle(e:MouseEvent):void {}

    Circle.Stop ();

    }

    Here's my output errors-

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at exercise2_fla::MainTimeline/redCircle()
    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at exercise2_fla::MainTimeline/greenCircle()

    What timeline you want to stop?

  • The code works is not on deployment

    This works:

    function onMouseOver_txtPPMB(e:MouseEvent):void
    {
    Mouse.Cursor = "Button";

    mcPPMB.alpha = 1;
    mcASB.alpha =. 5;
    mcISO.alpha =. 5;
    mcEA.alpha =. 5;
    mcAdmin.alpha =. 5;

    mcPPMB.scaleX = 1.25;
    mcPPMB.scaleY = 1.25;
    }

    It's not:

    function onClick_txtPPMB(e:MouseEvent):void
    {
    doSynopsis (1);
    }

    function doSynopsis(numBranch:Number):void {}
    var myXML:XML;
    var myLoader:URLLoader = new URLLoader();


    myLoader.load (new URLRequest ("content.xml"));
    myLoader.addEventListener (Event.COMPLETE, processXML);


    function processXML(e:Event):void {}
    var strTextBox:String;
    var style: StyleSheet = new stylesheet;


    styles.setStyle ("body", {}
    color: "#FFFFFF."
    fontFamily: "Arial, Helvetica, sans-serif"
    fontSize: '12'.
    display: "block".
    });
    styles.setStyle ("title", {}
    Color: ' #000000 ', '.
    fontFamily: "Arial, Helvetica, sans-serif"
    fontSize: '18'.
    display: "block"
    fontWeight: "bold".
    });
    styles.setStyle ("a: link", {})
    Color: "#FF0000".
    });
    styles.setStyle ("a: hover", {})
    textDecoration: 'underline '.
    });

    myText.textField.styleSheet = styles;

    myXML = new XML (e.target.data);

    Switch (numBranch) {}
    case 0:
    break;
    case 1:
    myText.textField.background = true;
    myText.textField.backgroundColor = myXML.Branch [0]. PPMB.attribute ("BGCOLOR");

    strTextBox = "< body >";
    strTextBox += myXML.Branch [0]. PPMB;
    strTextBox += ' < / body > ";*/
    break;
    case 2:
    myText.textField.background = true;
    myText.textField.backgroundColor = myXML.Branch [0]. ADSB.attribute ("BGCOLOR");
    strTextBox = "< body >";
    strTextBox += myXML.Branch [0]. ADSB;
    strTextBox += ' < / body > ";
    break;
    by default:
    trace ("the number is not equal to 0, 1, 2, or 3");
    }
    myText.visible = true;
    myText.textField.htmlText = strTextBox;

    }
    }

    When I hover over the text area (not the textarea component), the event fires and the alpha do their thing.  When I click on the text box, the textarea component will not appear.  Everything works fine in development.  The .swf works fine on my PC, but when I deploy (and the XML file resides in the same directory as the .swf), nothing happens when I click on the text box.

    Thoughts?

    Thank you.

    It seems that the Flash file is not in the same directory as the html (aspx) page.  Anything Flash file loads should be targeted as if the Flash file is in the same directory as the web page.  Then...

    myLoader.load (new URLRequest ("content.xml"));

    more would probably have to be...

    myLoader.load (new URLRequest("Flash/content.xml"));

    If the xml file is located in the same folder as the swf file

  • HTML5 reference code works is not inside the Javascript on DW CS6 function

    Hello

    I'm working on Dreamweaver CS6 and indicators of code does not work as expected when you write Javascript code.

    The minute that I insert a code hinting feature no longer appears the HTML5 elements.

    dw-with-function.gif

    Should I remove the function then him reappears indicators of HTML5.

    dw-no-function.gif

    How can I get the code referring to work when I add in the function?

    Thank you

    Herman

    Thank you for reporting this issue, Herman!

    We have recorded a bug for it and you're tracking internally.

Maybe you are looking for