QA

I l @ ve RuBoard

Q&A

Q1:

A lot of things in ActionScript use the underscore , _, as the first character. What does that mean?

A1:

The underscore is a standard way in some modern programming languages of identifying a predefined reserved property. You'll see many more properties like it in Hour 7, "Moving and Changing Movie Clips."

Q2:

How do I address a movie clip that is two levels down?

A2:

Using dot syntax, you can address the movie clip "innerClip" inside "outerClip" like this: innerClip.outerClip.stop(); . Similarly, you can use brackets to do it like this: this["innerClip"]["outerClip"].stop(); .

Q3:

In the last task, the global variable clipToTell is available only inside the movie clips. What if I wanted to get that value from the root level?

A3:

You could use dot syntax or brackets to address the variable the same way that you send commands to that movie clip ”for instance, cog1.clipToTell .

Q4:

In the last task, if the first movie clip assigns one value to clipToTell and the second movie clip assigns another value to clipToTell , doesn't the second assignment replace the first?

A4:

No. The global clipToTell exists as separate variables inside each movie clip. Think of the first one as cog1.clipToTell and the second one as cog2.clipToTell .

I l @ ve RuBoard


Sams Teach Yourself Flash MX ActionScript in 24 Hours
Sams Teach Yourself Flash MX ActionScript in 24 Hours
ISBN: 0672323850
EAN: 2147483647
Year: 2002
Pages: 272

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