PDA

View Full Version : Variables From Movie Clips


Now You See It
10-31-2008, 03:44 AM
I made a string variable on the main timeline. I tried to access it from a movie clip with an if command, but I got 1119: Access of possibly undefined property.
This is probably an easy problem.

StealingVision
10-31-2008, 04:23 AM
Let me see the code you're having a problem with. The solution could be a lot of different things. (oh, if you're using AS2 I'm going to have to let someone else take care of this.)

snickelfritz
10-31-2008, 08:33 AM
It's probably related to the fact that the variable is on the main timeline, while your reference to it is from a nested timeline.
ie: the variable does not actually exist within the scope of the nested MovieClip.

Try pasting the following code in your nested MovieClip, replacing "a" with the name of your variable.
trace(MovieClip(parent).a);

Now You See It
10-31-2008, 06:01 PM
Thanks, snickelfritz. I was trying to do this.parent.a. Your code worked.