PDA

View Full Version : Plz HELP!!! Actionscript 4 this



scafusia
September 20th, 2005, 02:09 AM
Hi there!
I´m a newbie and now I´m learning AS.
What I need is an AS code for a button which first play an animation ( a motion tween) and then load an external swf file.
Thx 4 reding
scafusia

kookaburra
September 20th, 2005, 02:26 AM
play the animation on "click" of the button and put the code for loading externam swf on the last frame of the animation

daheroes
September 20th, 2005, 02:48 AM
on the button,


on(release){
_root.play();
}


on the second frame, or whenever you want to load an external .swf:



var myClipLoader:MovieClipLoader = new MovieClipLoader();
myClipLoader.loadClip("externalfile.swf", _root.targetClip);


Just change "externalfile.swf" to the address of the file you wish to load, and change _root.targetClip to the clip you wish to load that .swf into on the stage.

Hope that helps. :beam: