我有检查,如果在舞台上存在的对象并将其删除函数内部的代码片段:引发ArgumentError:错误#2025:提供的DisplayObject必须是调用错误的孩子 - AS
public function closeContent(e:MouseEvent):void {
removeChild(txt);
removeChild(ldr.content);
removeChild(_closeButton);
container_mc.visible = false;
statusText.text="";
if (contains(submitButton)) {
removeChild(submitButton);
}
if (contains(saveinfoButton)) {
removeChild(saveinfoButton);
}
}
我试图改变stage
与this
和root
但总是收到此错误ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller
这将有助于读者很多,如果你格式化代码。 – 2010-03-22 16:49:01