维护闪存代码时出错
Getting error while maintaining flash code
我是 flashbuilder 的新手。我有这个现有代码要维护。所有 mxml
文件都有最外层的标签 s:WindowedApplication
。从一个页面到另一个页面的导航是使用如下代码完成的:
public function help_clickHandler(event:MouseEvent):void
{
var dTracker:aboutProduct = new aboutProduct();
this.addElement(dTracker);
}
导航到新页面后,单击新加载页面上的任何位置时出现以下错误:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/getChildIndex()
at mx.managers::SystemManager/getChildIndex() [E:\dev.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1823]
at mx.managers.systemClasses::ActiveWindowManager/mouseDownHandler() [E:\dev.y\frameworks\projects\framework\src\mx\managers\systemClasses\ActiveWindowManager.as:483]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
at mx.managers::SystemManager/mouseEventHandler() [E:\dev.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2918]
Error: Error #3003: File or directory does not exist.
at flash.filesystem::File/copyTo()
at studyTopics/studytopic_changeHandler()[C:\flash\HondaLMS\src\studyTopics.mxml:81]
at studyTopics/__lst_change()[C:\flash\HondaLMS\src\studyTopics.mxml:136]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
at spark.components::List/commitSelection()[E:\dev.y\frameworks\projects\spark\src\spark\components\List.as:1278]
at spark.components::List/commitProperties()[E:\dev.y\frameworks\projects\spark\src\spark\components\List.as:1148]
at mx.core::UIComponent/validateProperties()[E:\dev.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8219]
at spark.components::List/item_mouseDownHandler()[E:\dev.y\frameworks\projects\spark\src\spark\components\List.as:1915]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
at mx.managers::SystemManager/mouseEventHandler()[E:\dev.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2918]
请帮我解决这个运行时错误。
更新:
应用程序设计存在技术错误,即所有的mxml 都有WindowApplication。应该只有一个 WindowApplication,其余的应该是应用程序类型 (reference)。我仍然必须弄清楚如何从一个页面导航到另一个页面并 return 返回主页或上一页。
在一个 flex 应用程序中,只能有一个带有 WindowApplication 容器的 mxml。其余容器应为 Group。
我将登录页面保留为 WindowApplication,并将其余部分更改为 Group,这解决了我面临的问题。
我是 flashbuilder 的新手。我有这个现有代码要维护。所有 mxml
文件都有最外层的标签 s:WindowedApplication
。从一个页面到另一个页面的导航是使用如下代码完成的:
public function help_clickHandler(event:MouseEvent):void
{
var dTracker:aboutProduct = new aboutProduct();
this.addElement(dTracker);
}
导航到新页面后,单击新加载页面上的任何位置时出现以下错误:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/getChildIndex()
at mx.managers::SystemManager/getChildIndex() [E:\dev.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1823]
at mx.managers.systemClasses::ActiveWindowManager/mouseDownHandler() [E:\dev.y\frameworks\projects\framework\src\mx\managers\systemClasses\ActiveWindowManager.as:483]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
at mx.managers::SystemManager/mouseEventHandler() [E:\dev.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2918]
Error: Error #3003: File or directory does not exist.
at flash.filesystem::File/copyTo()
at studyTopics/studytopic_changeHandler()[C:\flash\HondaLMS\src\studyTopics.mxml:81]
at studyTopics/__lst_change()[C:\flash\HondaLMS\src\studyTopics.mxml:136]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
at spark.components::List/commitSelection()[E:\dev.y\frameworks\projects\spark\src\spark\components\List.as:1278]
at spark.components::List/commitProperties()[E:\dev.y\frameworks\projects\spark\src\spark\components\List.as:1148]
at mx.core::UIComponent/validateProperties()[E:\dev.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8219]
at spark.components::List/item_mouseDownHandler()[E:\dev.y\frameworks\projects\spark\src\spark\components\List.as:1915]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
at mx.managers::SystemManager/mouseEventHandler()[E:\dev.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2918]
请帮我解决这个运行时错误。
更新:
应用程序设计存在技术错误,即所有的mxml 都有WindowApplication。应该只有一个 WindowApplication,其余的应该是应用程序类型 (reference)。我仍然必须弄清楚如何从一个页面导航到另一个页面并 return 返回主页或上一页。
在一个 flex 应用程序中,只能有一个带有 WindowApplication 容器的 mxml。其余容器应为 Group。
我将登录页面保留为 WindowApplication,并将其余部分更改为 Group,这解决了我面临的问题。