Starting & Stopping Movieclips in Flash
Flash Tutorial to control Movieclip symbols using Actionscript
While working with Movieclips in Flash you will find it necessary to start and stop the animation at runtime. Movieclips can be easily controlled using Actionscript in Flash. The instance name of the Movieclip symbol is used to control it using Actionscript commands. In this Tutorial you'll learn how to control Movieclips using simple Actionscript code. It is very simple and neatly explained below.
Controlling Movieclips using Actionscript
- Create a Movieclip (Refer Advanced Masking for this example) with some animation and name the instance say, 'mask_mc'.
- Create a Button 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:
- Save your work and test the Movie (Ctrl + Enter). Thats it you have learnt how to control movieclips in Flash using Actionscript.
Start Button
on(press)
{
mask_mc.play();
}
Stop Button
on(press)
{
mask_mc.stop();
}
Fig: Start & Stop Movieclip using Actionscript
Absolutely FREE Web Templates
Check out these quality free web templates and download them without any registration or sign-up!
FREE Web Design Guide
From web design tips & ideas to HTML, CSS Styles, Fireworks & Dreamweaver you'll find all you need to know about effective web site design right here!
Quality Dreamweaver Templates
Professional quality dreamweaver templates in over 20 categories, starting at just $9.95! Instant download & easy customization

