tags:

views:

211

answers:

2

Hi Guys,

I have the following code which ultimately loads a SWF into movieclip 'myloader' using a movie clip loader, code as follows:

var myload:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
myload.addListener(listener);

listener.onLoadStart = function(){
    animcontainer.myloader._lockroot = true;
    trace("Started");
    }

listener.onLoadInit = function(){
    animcontainer.myloader._lockroot = true;
    trace("finished and locked");
    }

listener.onLoadComplete = function(){
    animcontainer.myloader._lockroot = true;
    }

myload.loadClip(path, animcontainer.myloader);

The swf I am loading has pause, rewind and play buttons that must be referencing _root as they work fine when played alone. Upon loading them into myloader they no longer work.

Based on the above code surely the myloader clip should be locking as _root after the load is complete?

I have Googled myself dry on this one, no luck. ANY help will be much appreciated,

Thanks.

A: 

_lockroot is a flag. you need to set it to true.

edit: did you try animcontainer.myloader._lockroot = true prior to loading?

greetz
back2dos

back2dos
Apologies for this silly mistake, I have been doinf it wiith _lockroot = true; for the entire day, but it changes nothing. If myloader is the clip into which I am loading my swf then it IS myloader that needs to be set as myloader._lockroot = true, correct?
webfac
@webfac: please see update.
back2dos
Sorry for such a VERY late response, but indeed I did try animcontainer.myloader._lockroot = true prior to loading as well as onLoadComplete AND onLoadInit and still no luck, it's like one of those ActionScript monsters I have never been able to tame!
webfac
+2  A: 

Oops, thought this was initially as3:

try:

listener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number){
    target_mc._lockroot = true;
    }
quoo