Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 86399

loading multiple swf's with addChild without blinking in between

$
0
0

I have a shell Flash that pulls in a swf file.  When you hit the next button, it pulls in the next swf file.  I numbered the swf files so they're 1.swf, 2.swf, etc.  Everything works fine except theirs this blinking in between removing the old swf and bringing in the new.  Right now I'm having them load into an existing moveClip called "clipsMC".  I'm guessing that there's a split second where the old swf is removed and the new one loads.  I need to have them run smoothly together though, so some type of listener to make sure the new one is loaded before removing the old one?  Here's the part of the code I have for bringing it in:

 

 

function loadSwf()

{

  clipNum = clipVar + ".swf"; // creates the name of the swf file... 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);

  }

}


Viewing all articles
Browse latest Browse all 86399

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>