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

Chapter 5. Controlling Multiple Timelines > Absolute and Relative Paths

Absolute and Relative Paths

Flash gives you two mode options in the Insert Target Path dialog box: relative and absolute. In the preceding example, the method train.wheels.stop() originated from the main Timeline. When Flash executes that method, it looks within its own Timeline for the object called train that contains another object called wheels. This is an example of a path that uses relative mode. Everything is relative to where the ActionScript statement resides—in this case, the main Timeline. An alternative way of inserting a target path is to use absolute mode, which has no particular frame of reference. You can think of relative target paths as being directions given from your present location, as in “Go two blocks straight; then turn left.” Absolute target paths, on the other hand, are directions that work no matter where you are, as in “Go to 555 University Avenue.”

Why would you use one mode instead of the other? If you need to target a Timeline that sits at a higher level than the Timeline you’re working in, you can use absolute mode. Imagine that you want to have a movie clip control the main Timeline in which it resides. In relative mode, you see only the Timelines that are inside the current one. In absolute mode, you see all the Timelines no matter where you are. Absolute mode is like having a bird’s-eye view of all the movie clips on the Stage at the same time.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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