Learnthat.com Free Certification and Computer Online Courses
ThatNetwork.com Internet Media Network Exampractice.com free certification practice exams, mcse, comptia Definethat.com - Free technical definitions, define Free Romance Tips, Romantic Tips, Date Ideas Free POD publisher comparison print on demand
Learnthat.com Free A+ Certification, Computer Classes, Certification Courses, Business, Lifestyle, ApplicationsFree business tutorials and definitionsFree certification tutorials and definitionsFree computer and technical tutorials and technical definitionsFree Finance Tutorials and DefinitionsFree House Repair TutorialsFree Lifestyle and Fun Tutorials
  All Online CoursesNew Courses QuickTipsWord DefinitionsSubmit a TutorialLinks
÷ Resources
Home
free tech tutorials
Free Tutorials
free tech tutorials
Certifications
free tech tutorials
Definitions
free tech tutorials
Resources/Links
free tech tutorials
Forums
free tech tutorials
Distance Education
free tech tutorials
Highest Rated Tutorials
÷ Popular Tutorials
÷ New Tutorials

Adding Behaviors to Buttons in Flash Tutorial

 

Adding Behaviors to Buttons (Continued)

Remember that when we added a behavior to our button earlier, we selected a movie clip behavior from the Behaviors panel. Flash automatically added the event for the mouse (on release). When we add script using the Actions panel, we need to add the event manually. Under Global Functions, select Movie Clip Control and then on from the submenu:

When we add the on event, Flash inserts the code and then pops up a menu allowing us to select which event we want to use. Double-click release in the menu to insert it. The on(release) event makes the behavior happen when the user releases the mouse button after clicking it.

Tip:

If you accidentally lose the pop-up menu, click the Show Code Hint  button on the toolbar over the Script pane.

The Script pane should now look like the following:

  1. We now need to add the action that will be performed when the user releases the mouse button. We’re interested in actions related to the Timeline—that is, we want to use the buttons to control the progression of the Timeline. Therefore, we’ll select an action from the Timeline Control folder. Make sure the cursor is positioned between the two curly braces ({}) in the Script pane, and double-click play in the Timeline Control folder:

This tells Flash to play the animation when the user clicks the play button.

  1. We’ll follow the same steps for our pause and stop buttons. Select the pause button on the Stage and, in the Actions panel, add another on(release) event, just as you did for the play button.
  2. Between the curly braces, add a stop() action from the Timeline Control folder.

The stop() action will stop the animation in whatever frame is currently active when the user presses the pause button. If the user then presses the play button, the animation will continue from that frame. This is an effective means of essentially pausing the animation.

 

by Summer Doucet

Find more free Software tutorials from Learnthat.com.

More Information:

Help us by rating this tutorial: [---] [--] [+] [++] [+++]
[---] lowest; [+++] highest

 

 

 


Learn: Free Tutorials - Links to Free Tutorials
Understand: Free Technical Definitions - ExplainThat Whitepapers
Use: Certification Section - Discussion Forum

Visit Our Network Sites:

DefineThat.com Technical Defintions Romancetips.com
Free Gift Ideas - GiveThat Planthat.com Free Unique Business Ideas
PublishOnDemand.net - Learn about Print on Demand (POD) - Self Publishing Seekthat.com - Technical Search Engine
ThatNetwork.com  

About Us : Contact Us : Advertise : Privacy Information

© 1998-2004 Learnthat.com