Quantunet.com

My Account

Joins Us
Flash 8 Actionscript 2.0 QuickSkills

Creating Tween Selection Buttons

 

How to create movie tween selection buttons:

  • In the "buttons" layer:
    • Select the rotate button then in the properties panel set the instance name to "rotate_btn".
    • Select the scale button then in the properties panel set the instance name to "scale_btn".
    • Select the fade button then in the properties panel set the instance name to "fade_btn".
  • Then in the "actions" layer:
    • Select the first frame.
  • Open the actions panel.
  • Enter the following code in the "Actions-Frame" panel.

rotate_btn.onPress = function(){
gotoAndPlay(2);
}
scale_btn.onPress = function(){
gotoAndPlay(21);
}
fade_btn.onPress = function(){
gotoAndPlay(41);
}

  • In the main menu go to Control > Test Movie.
 

Note: There is a simple "stop()" command at the end of each timeline tween to ensure the playhead stops when the animation has completed. To replay an animation simple press the corresponding button again.

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