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
精彩评论