Skip to main content
This topic has been closed for replies.

2 replies

Colin Holgate
Inspiring
July 12, 2017

If you are loading test11 using a Loader, into the home.fla stage, then I think the problem is that MovieClip(root) is pointing to the main timeline of test11, and not the main timeline of home.fla.

There is an event for when something is added to the stage. At that point the object certainly has a parent, and you could get the parent of test11. It would be like this (in test11):

var global:MovieClip;

addEventListener(Event.ADDED_TO_STAGE,added);

function added(e:Event){

  global = MovieClip(MovieClip(root).parent);

}

Then global should be pointing at the main timeline of home.fla.

Participant
July 13, 2017

I added the following to test11.fla,

var global:MovieClip;

addEventListener(Event.ADDED_TO_STAGE,added);

function added(e:Event){

  global = MovieClip(MovieClip(root).parent);

  trace("global");

  trace(global);

}

It never prints "global".

kglad
Community Expert
Community Expert
July 13, 2017

did you read the help at that link?

kglad
Community Expert
Community Expert
July 12, 2017