24 Mei 2010

Controlling Movieclips using Actionscript



  1. Create a Movieclip (Refer the Flash Photo Masking tutorial for this example) with some animation and name the instance say, 'mask_mc'.
  2. Create a Button for Start and Stop action of the movieclip and name them as 'start_btn' and 'stop_btn' respectively.
  3. Write the following Actionscript code for the 2 Buttons as given below:
  4. Start Button on(press) { mask_mc.play(); } Stop Button on(press) { mask_mc.stop(); }
  5. Save your work and test the Movie (Ctrl + Enter). Thats it you have learnt how to control movieclips in Flash using Actionscript.

Fig: Start & Stop Movieclip using Actionscript
source : http://www.smartwebby.com/

Related Posts by Categories



0 komentar: