1
votes

I am new to flashbuilder. I have got this existing code to maintain. All of the mxml files have outermost tag s:WindowedApplication. The navigation from one page to another is done using code as follows:

public function help_clickHandler(event:MouseEvent):void
{
    var dTracker:aboutProduct = new aboutProduct();
    this.addElement(dTracker);
}

After navigating to a new page I get following error on clicking any where on newly loaded page:

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]

Please help me solve this runtime error.

Update:

There is a technical error in the design of application, i.e., all of the mxml have WindowApplication. There should be only one WindowApplication and rest of them should be Application type (reference). Still I have to figure out, how to navigate from one page to another page and return back to main page or previous page.

1
Check the flex sdk version that you're using now and used while developing the existing code. Are those same? - Yasuyuki Uno
The application was developed using flashbuilder 4.5 but I am having flashbuilder 4.7. It is a pre-existing issue. - Anusha
The difference between flashbuilder 4.5 and 4.7 is no problem. It's just an IDE. Flash Builder 4.7 uses Flex 4.6 SDK by default. And I guess the existing project uses 4.5 SDK or more older SDK. So, you should download 4.5 SDK and use it. It can download here. sourceforge.net/adobe/flexsdk/wiki/Download%20Flex%204.5 - Yasuyuki Uno
There is older setup with 4.5 version in another desktop. But same error there. - Anusha
hmm... seems from the 2nd error "#3003 File or directory does not exist", the project depends on some file or directory, doesn't it? - Yasuyuki Uno

1 Answers

0
votes

In one flex application there can be only one mxml with WindowApplication container. Rest of the containers should be Group.

I left landing page as WindowApplication and changed rest in Group, this revolved the issue I was facing.