我是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\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1823]
at mx.managers.systemClasses::ActiveWindowManager/mouseDownHandler() [E:\dev\4.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\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
at mx.managers::SystemManager/mouseEventHandler() [E:\dev\4.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\46\HondaLMS\src\studyTopics.mxml:81]
at studyTopics/__lst_change()[C:\flash\46\HondaLMS\src\studyTopics.mxml:136]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
at spark.components::List/commitSelection()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\List.as:1278]
at spark.components::List/commitProperties()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\List.as:1148]
at mx.core::UIComponent/validateProperties()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8219]
at spark.components::List/item_mouseDownHandler()[E:\dev\4.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\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
at mx.managers::SystemManager/mouseEventHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2918]
请帮我解决这个运行时错误。
更新
应用程序设计存在技术错误,即所有mxml都有WindowApplication。应该只有一个WindowApplication,其余的应该是应用程序类型(reference)。我仍然需要弄清楚,如何从一个页面导航到另一个页面并返回主页面或上一页面。
答案 0 :(得分:0)
在一个flex应用程序中,只有一个带有WindowApplication容器的mxml。其余的容器应该是Group。
我将登录页面保留为WindowApplication,并在Group中更改了休息状态,这解决了我面临的问题。