Preloading external swf invisibly help!

  • skilleddesigner
  • Born
  • Born
  • skilleddesigner
  • Posts: 1

Post 3+ Months Ago

Hi friends,

i have 4 swf

1.main.swf
2.content1.swf
3.content2.swf
4.content3.swf


on main.swf , i am using the following scripts to load external swf ( content1.swf, content2.swf & content3.swf ) dynamically with a transitions .

Code: [ Select ]
stop();



//initialise a variable
nextMovie="content1.swf";
//load the starting movie into level 1
loadMovieNum(nextMovie,1);



//button1 actions
button1.onRelease=function(){
    //this makes sure that content 1 isn't already loaded
    if(nextMovie!="content1.swf"){
    //set the variable that holds the name of the movie to be loaded
    nextMovie="content1.swf";
    //tell the currently loaded content movie to play it's outro animation
    _level1.gotoAndPlay("outro");
}
}





//button2 actions
button2.onRelease=function(){
    //this makes sure that content 1 isn't already loaded
    if(nextMovie!="content2.swf"){
    //set the variable that holds the name of the movie to be loaded
    nextMovie="content2.swf";
    //tell the currently loaded content movie to play it's outro animation
    _level1.gotoAndPlay("outro");
}
}



//button3 actions
button3.onRelease=function(){
    //this makes sure that content 3 isn't already loaded
    if(nextMovie!="content3.swf"){
    //set the variable that holds the name of the movie to be loaded
    nextMovie="content3.swf";
    //tell the currently loaded content movie to play it's outro animation
    _level1.gotoAndPlay("outro");
}
}
  1. stop();
  2. //initialise a variable
  3. nextMovie="content1.swf";
  4. //load the starting movie into level 1
  5. loadMovieNum(nextMovie,1);
  6. //button1 actions
  7. button1.onRelease=function(){
  8.     //this makes sure that content 1 isn't already loaded
  9.     if(nextMovie!="content1.swf"){
  10.     //set the variable that holds the name of the movie to be loaded
  11.     nextMovie="content1.swf";
  12.     //tell the currently loaded content movie to play it's outro animation
  13.     _level1.gotoAndPlay("outro");
  14. }
  15. }
  16. //button2 actions
  17. button2.onRelease=function(){
  18.     //this makes sure that content 1 isn't already loaded
  19.     if(nextMovie!="content2.swf"){
  20.     //set the variable that holds the name of the movie to be loaded
  21.     nextMovie="content2.swf";
  22.     //tell the currently loaded content movie to play it's outro animation
  23.     _level1.gotoAndPlay("outro");
  24. }
  25. }
  26. //button3 actions
  27. button3.onRelease=function(){
  28.     //this makes sure that content 3 isn't already loaded
  29.     if(nextMovie!="content3.swf"){
  30.     //set the variable that holds the name of the movie to be loaded
  31.     nextMovie="content3.swf";
  32.     //tell the currently loaded content movie to play it's outro animation
  33.     _level1.gotoAndPlay("outro");
  34. }
  35. }



everything seems to working fine.
Is it possible to load the all the external swf files invisibly while browsing the website? something like multi swf preloader.
my intention is load content1.swf , content2.swf & content3.swf invisibly in the cache in advance so that it doesn't load again & again once i click button1, button2 & button3.

any idea friends??
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

Move the target clip off the stage so you can't see it. Then do your load and either move the clip back when you want it to be visible or dump the clip after its loaded and reload again where you need it from the cache.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 15 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.