• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Adding Basic Scripts

In Chapter 1's project you created a button that stopped and played the SWF file. You used ActionScript to add some functionality to that button. ActionScript can be added to a SWF file to add all sorts of functionality, which you will learn about beginning in Chapter 6. In this project, you will add an action that controls the Timeline, instead of allowing the user to specify when the animation starts or stops. To do this, you add the stop action to the Timeline, instead of putting it within the button code. Then, you will create a button, much like in the project in Chapter 1, which plays the animation from frame 1 when the user clicks the button.

Exercise 6: Adding stop and a replay button

First, you add an action directly to the Timeline, and then you will create a button and add ActionScript to the Timeline that controls the button.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint