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

Chapter 5. Managing Flash Communication > 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 last example, the method bigClock.smallClock.gotoAndStop(5) originated from a button residing on the main Timeline. When Flash executes that action, it looks within that Timeline for the object called bigClock that contains another object called smallClock. This is an example of a path that uses the relative mode. Everything is relative to where the action 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 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 over the other? If you need to target a Timeline that sits at a higher level than the current Timeline you're working in, you need to use absolute mode. For example, imagine that you want to have a movie clip control the main Timeline in which it resides. With relative mode, you only see the Timelines that are inside the current one. With absolute mode, you see all the Timelines no matter where you are. In absolute mode, it's as if you have a bird's-eye view of all the movie clips on the Stage at once.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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