Chapter 3. Understanding Target Paths


Communication is an important part of our everyday lives. We communicate via phones, e-mail, regular mail, and so on. Since nearly everyone in the world communicates in a similar fashion, without a system of individual identification, it would be impossible to route those communications from one person to another. We all have unique phone numbers, e-mail addresses, and street addresses all of which ensure that the communications intended for us actually reach us.

Just as phone numbers, e-mail addresses, and street addresses lead communications to their intended recipients, Macromedia Flash target paths lead one timeline to another, allowing them to communicate. In this lesson, we'll take a look at the various target paths used in typical Flash projects as well as show you how to use Flash's powerful ability to have timelines talk to each other a capability you'll use to give your projects more depth and sophistication.

A thorough understanding of target paths and how to use them will allow you to create sophisticated applications where independent timelines can work together to perform tasks. The above "windowed" Flash application (which we'll create in this lesson) will provide an excellent example of the way target paths can be used to give a project more depth and sophistication.

graphics/03fig01.gif

WHAT YOU WILL LEARN

In this lesson, you will:

  • Gain an understanding of the hierarchy of timelines in Flash movies

  • Learn about absolute and relative target paths

  • Learn how movies communicate with one another

  • Control specific timelines within a single project

  • Control movies loaded into levels

  • Use the parent-child relationship in movies to create an "effect" clip

  • Learn how to make global references to various ActionScript elements

APPROXIMATE TIME

This lesson takes approximately 1½ hours to complete.

LESSON FILES

Media Files:

None

Starting File:

Lesson03/Assets/currentTarget1.fla

Lesson03/Assets/rootTarget1.fla

Lesson03/Assets/parentTarget1.fla

Lesson03/Assets/movieclipTarget1.fla

Lesson03/Assets/backgroundControl1.fla

Lesson03/Assets/textBox1.fla

Lesson03/Assets/levelTarget1.fla

Lesson03/Assets/levelTarget2.fla

Lesson03/Assets/backgroundControl2.fla

Lesson03/Assets/levelTarget.swf

Completed Project:

currentTarget2.fla

rootTarget2.fla

parentTarget2.fla.

movieclipTarget2.fla.

textBox2.fla

levelTarget3.fla

backgroundControl3.fla



Macromedia Flash MX ActionScripting Advanced. Training from the Source
Macromedia Flash MX ActionScripting: Advanced Training from the Source
ISBN: 0201770229
EAN: 2147483647
Year: 2002
Pages: 161

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net