Similarly, you will access the variable of any object, using parentas the target object. Since the property parentis of type DisplayObjectContainer, you need to point it to the MovieClipfollowing:
trace((parent as MovieClip).myvar);
The reason for rejecting it MovieClipis that it dynamicmeans that you will not get compile-time errors for trying to access properties that the compiler is not aware of.
Marty source
share