开发者

Can ANYONE get _lockroot to work?

开发者 https://www.devze.com 2022-12-29 10:53 出处:网络
I have the following code which ultimately loads a SWF into movieclip \'myloader\' using a movie clip loader, code as follows:

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.


Oops, thought this was initially as3:

try:

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


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

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

greetz
back2dos

0

精彩评论

暂无评论...
验证码 换一张
取 消