Quantunet.com

My Account

Joins Us
Flash 8 Actionscript 2.0 QuickSkills

Adding Actions To Button Objects

 

How to add actions to button objects:

  • Create your tween and place the actionscript code "stop();" in the last frame of the tween.
  • Create a button in a new layer.
  • Select the button instance on stage.
  • Open the "Actions" panel.
  • Enter this code in the "Actions-Button" panel.

on(Press){
gotoAndPlay(1);
}

  • Press Ctrl + Enter to test the movie.
 

Note:
The actionscript "stop();" has been placed in the last frame of the motion tween. This causes the play head stop when it reaches that frame and so the animation stops at the end of the tween.

© 2008 Quantunet LLC All Rights Reserved | Intellectual Property | Terms of Use | Privacy
Home | About Quantunet | FAQ's | Contact Us