Access root from the loaded swf

Hi,

I am migrating to AS 3.0 from AS 2.0 and I am unable to access the root of the main swf from the loaded swf.

In AS 2.0 i simply used "_root.gotoAndPlay(frame number);

I have also tried Movieclip(this.root).gotoAndPlay(frame number); but it doesn’t work.

Any help or suggestions please.

Regards,

Harry Kooner.

In your main swf have a function named e.g calledFromLoaded which includes whatever action needs to be applied from the loaded swf. Then in your externally loaded swf have the following:

if(this.parent.parent != null)
{
	var parentObj:Object = this.parent.parent as Object;
	parentObj.calledFromLoaded();
}