apache-flex 维护闪存代码时出错

piv4azn7  于 2022-11-01  发布在  Apache
关注(0)|答案(1)|浏览(142)

我是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,其余的都应该是Application类型(reference)。我仍然必须弄清楚,如何从一个页面导航到另一个页面,然后返回到主页面或上一个页面。

ttp71kqs

ttp71kqs1#

在一个Flex应用程序中,只能有一个带有WindowApplication容器的mxml。其余容器应为“组”。
我离开了登录页面作为WindowApplication和改变休息组,这是我所面临的问题.

相关问题