Ok Ive got a simple flash file, since im trying to accomplish accessing a variable from the main stage inside a movie clip. All the things Ive found from google point to MovieClip(root). But its not working for me.
On the main timeline:
var MyName:String;
MyName = "kenny";
Then I have a movieclip called MyBox, its code:
trace(MovieClip(root).MyName);
And I get this error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@2d2df089 to flash.display.MovieClip. at MyBox/sendpmtext()
I have also tried MovieClip(parent), MovieClip(parent.parent), MovieClip(stage), MovieClip(this.stage) and no luck. Any help please?