![]() |
|
| • All Online Courses • New Courses • QuickTips • Word Definitions • Submit a Tutorial • Links • |
|
Adding Behaviors to Buttons in Flash (Continued) Adding Behaviors to Buttons (Continued)Add another keyframe to frame 3 of the Actions layer and, in the Actions panel, add another stop() action. The Actions layer should now display the small action symbol (a) in frames 1 and 3:
Take a look at the ActionScript Flash inserted when you added the behavior to the button: Select the button on the Stage and open the Actions panel:
Notice that “myButton1” appears on the tab below the Script pane. You’re seeing the code attached to the button instance. The code itself is very simple: it tells Flash to move to and play frame 3 when the button is released. (The grey text next to the slashes (//) are comments—they’re informational only and don’t affect the code.) Although you can use the Behaviors panel to quickly add simple behaviors to buttons, the Actions panel provides far more options. You’ll find the same behaviors in the list of actions, and then some. As an example, we’re going to return to our motion tween with the car. We’ll add some controller buttons—a play button, a pause button and a stop button. You can either create these yourself or borrow some from the Flash button sample library. Drag them onto the Stage, or draw them and convert them to symbols, naming each instance something like “btnPlay”, “btnPause” and “btnStop”. As you progress through the following steps, you can check the screenshots to make sure everything is correctly named and in place.
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:
About Us : Contact Us : Advertise : Privacy Information