大家好,这里需要一些帮助。基本上我想在(guy1)击中hitTestObject(home1_mc)之后前进到第4帧。
这是我得到的错误:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at DNAGames2_fla::MainTimeline/exitFrameHandler()
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at DNAGames2_fla::MainTimeline/exitFrameHandler()
这是我的代码:
function exitFrameHandler(event:Event):void{
if(guy1.hitTestObject(home1_mc)) {
removeChild(guy1);
removeChild(guy2);
removeChild(guy3);
removeChild(o1);
removeChild(cherry1);
gotoAndStop(4);
}
}
我尝试移除孩子的原因是因为在我为我的游戏切换菜单后它们仍然在屏幕上。任何帮助表示赞赏