.
.
 
Symbol Combinations and
Specifying Targets, Part I

Download the SymbolCombos.fla file used in this tutorial series.

Specifying Targets is the first major hurdle in learning Flash's action script. Many never truly understand the methods shown in this tutorial. We will explore how to properly specify targets in the context of combining symbols of different types within each other. We will also show how an embedded button can control the timeline of its container.

Dissymmetry Intermediate Flash Tutorial (5,214 bytes)

Specifying Targets

There are a few things you need to remember when dealing with target paths. The target strings are constructed much like URL strings are. They use the forward slash "/" to signify a change in level or "directory". If we think of each symbol's timeline as a "directory" or folder and the variables it contains as files, it helps to simplify matters.

Here's a scenario: We have a .fla file with two movie clips named "MC1" and "MC2" in the "Scene 1" timeline. Each of these also contain two movie clips called "MC1a", "MC1b" for the first and "MC2a" and "MC2b" for the second.

From within "MC1a" you can reference "MC2" like this:

/MC2
or _level0/MC2

"_level0" refers to the first scene location regardless of its name. To reference the second scene, it would be "_level1". To reference "MC2a" from within "MC1a":

/MC2/MC2a
or
_level0/MC2/MC2a

To reference "MC1b" from "MC1a" use any of these:

_level0/MC1/MC1b
../MC1b
or
/MC1/MC1b

Accessing loaded movies loaded into "layer1" with the "Load Movie" action are referenced by:

_layer1

You can access all the elements and variables in the loaded movie the same way as normal with this in the front of the target string.

Next Tutorial: Symbol Combinations, Part II (Grouping Symbols)

 

.
Right-Bottom 006699.gif (866 bytes)

"The Internet is the foundation for a new industrial order. ... If you don't believe deeply, wholly...that the Net is going to change your business, you're going to lose."  - Fortune Magazine

All graphics on this site are copyrighted by their respective distributors and may not be duplicated, modified in any fashion or used in any way without consent.

Last Updated: 12/5/07

Home |  Tutorials |  Basic |  Intermediate |  Advanced |  Contact Us