Monday, January 12, 2009

Controlling Movieclips using Actionscript

Create a "Movie Clip" with some animation and name the instance say, 'mask_mc'.
Create two Buttons for Start and Stop action of the movieclip and name them as 'start_btn' and 'stop_btn' respectively.
Write the following Actionscript code for the 2 Buttons as given below: (red one)

Start Buttonon
on(press)
{
mask_mc.play();
}


Stop Buttonon
on(press)
{
mask_mc.stop();
}

Save your work and test the Movie (Ctrl + Enter). Thats it you have learnt how to control movieclips in Flash using Actionscript.

I hope you like it.

No comments:

Post a Comment

Write your Comments here.