stupid error #2025 - How can I solve it?
hi! how guys! i'm having problem while i'm trying remove child. have button loads loader , next , button let navigate through images in it. , last menu button brings stage menu bar. when click menu action remove images loader. can that, if there images there in loader, otherwise error:
argumenterror: error #2025: supplied displayobject must child of caller. @ flash.display:
:displayobjectcontainer/removechild()
it seems if statement doesn't work properly. guess must have error, can't figure out which.
thanks in advance!!
here code:
menubra.addeventlistener (mouseevent.click, onclickbra);
function onclickbra (event:mouseevent):void {
if(contains(loaderbrand)) {
removechild(loaderbrand);
var tweenprint1:tween = new tween(menu_mc,"x", strong.easeout, -4000, 0, 1, true);
}
else {
var tweenprint2:tween = new tween(menu_mc,"x", strong.easeout, -4000, 0, 1, true);
}
trace ("menu clicked"); }
hi,
try check if(loaderbrand != null) before ur original if condition
or
can u pls put full code can understand it
More discussions in ActionScript 3
adobe
Comments
Post a Comment