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

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.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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