Accessing a varialbe inside a Movieclip

Hello,

I’m having trouble trying to access a variable created inside a movieclip from the main timeline, and was wondering if you guys could help me out.

What I have is a movieclip called “robot_mc” with a boolean variable created inside it called “armUp”, which keeps track of if the robot’s arm is up or down.

I tried accessing the variable from the main timeline with the following code:

trace(robot_mc.armUP);

but it always seems to return the default “false” value, even if I set it to “true” within the movieclip. I’ve tried reading an integer and a string inside a movieclip as well, but it just returns “0” and “null” respectively. It seems like the compiler can tell what kind of data type the variables are, but just automatically sets it to the default value.

Am I doing something incorrectly? :q:

Thanks in advance,
tbeanz