I have created a XML driven shell where I’m calling external SWF files reading from the XML. Some of the SWFs has SCROLLPANE from the component panel of Flash is added on their respective stages. Now if I’m running those files individually, they are working fine. But it is loaded in the shell the below issue is coming.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.containers::ScrollPane/setScrollDrag()
at fl.containers::ScrollPane/draw()
at fl.core::UIComponent/drawNow()
at fl.containers::BaseScrollPane/get maxVerticalScrollPosition()
at com.components::TableComp/resetAll()
at com.components::TableComp()
at TableComponent()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at com::Main()
The problem I believe is with the stage reference used by the component. I usually use a Model class to handle the stage reference. But I’m unable to handle the stage reference of the component. Please help.
to have an access to stage prop of the loaded clip first it must be added into display list in main movie. So maybe the external clip aren’t added with addchild or in the external movie some code are executed before the movie is loaded into stage. ( maybe the code is in c-tor).