• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 7. Programming with ActionScript > Using Methods Instead of Actions

Using Methods Instead of Actions

You've used basic ActionScript to create interactivity. Now you're going to take the ActionScript to the next level by using methods. A method is a bit of reusable code that can be applied to a target. The target can be several things, but in this exercise, you'll use a movie clip as the target. In ActionScript, this target is known as the object to which a method is applied.

In the preceding exercise, you used an action to control an instance of the tack clip's timeline. The action (startDrag) required a parameter: the target you wanted to start dragging. You could rewrite this line of ActionScript, using a method, and the functionality would remain the same.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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