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

Chapter 28. The Basics of ActionScript > Attaching ActionScript to a Timeline

Attaching ActionScript to a Timeline

When you attach ActionScript to a timeline, the ActionScript must be contained within a keyframe. It is considered a best practice to place ActionScript in a timeline and in a separate layer at the top of the layers panel so that it's easier to find.

To add ActionScript to the timeline, select the keyframe you want it in, or insert a keyframe in the position where you want the ActionScript to execute. In the Actions pane of the Actions panel, write the ActionScript you want. The following example sets the opacity of a Movie Clip to 70% when the Playhead enters the frame the ActionScript is in:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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