Search Tutorials
Ok , now go to the actions layer and select the first frame (should only be 1 frame in this movie,& 3 layers)and click f9 on your keyboard to bring up the actions panel. And now you can type:
//load_btn
load_btn.onPress=function(){
loadMovie("loaded_movie.swf","_root.holder_mc");
this.enabled = false;
};
//unLoad_btn
unLoad_btn.onPress=function(){
_root.holder_mc.unLoadMovie();
load_btn.enabled=true;
Save file and publish. Close this document. Now create a new document save it as "loaded_movie.fla". Save it onto the same folder as "mainMovie.fla" ("This is the swf we will load into the main movie into the "holder_mc")in the properties inspector make the stage 250x250. Go to the toolBar and select the "Rectangle Tool" and draw a box 250x250 center it on the stage. Select the box and->(ctrl+alt+2, then ctrl+alt+5.) Now it should be centered. Save the file and publish it. All of the files must reside in the same folder. Go to your folder and select the mainMovie.swf ,open it and click on the btn "load_btn" and you should have loaded your swf into the holder_mc.now try the unload_btn. If you have found anything wrong with my tutorial please feel free to email me about it and i will correct my error(s).Also please download the source file before e-mailing questionsabout loadMovie(); Hope this was helpful ! Timo
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|