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

16.2. Adding Scripts to Frames

Flash documents are fundamentally structured around the concept of animation. Every Flash document comprises a linear sequence of frames, or slices of visual and audio content. A great deal of ActionScript code is tied to this frame-based structure. By placing a code block on a frame, we stipulate the timing of that block's execution relative to the playback of the movie. Whenever we add code to a frame, we must always consider not only what we want the code to do, but also when we want the code to execute.

For example, we may want to write some code that places a new movie clip on stage when the 20th frame of a movie is displayed:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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