Hello all,

I have a problem that is not very easy to explain so please bare with me.

Here is the context:

I have a Component class written in pure AS3 that extends the Canvas Class. I 
then have a Weather component that extends that Component Class. This Weather 
Component contains a couple of labels some HBoxes and an Image component.

Now here is the problem:

When I addChild(x) where x is my Weather component. I get an Error :

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
        at 
mx.controls::SWFLoader/addedToStageHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\controls\SWFLoader.as:1990]
        at flash.display::DisplayObjectContainer/addChildAt()
        at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$addChildAt()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\core\UIComponent.as:5083]
...

Hints to the reason for this error:

1. My weather component is compiled seperatly and loaded at runtime.
2. The IMAGE in the Weather component is the culprit. The other components in 
the Weather comp get added with no errors .
3. I traced the error to the "addedToStageHandler" of the SWFLoader:

private function addedToStageHandler(event:Event):void
    {
        
systemManager.getSandboxRoot().addEventListener(InterManagerRequest.DRAG_MANAGER_REQUEST,
 
                mouseShieldHandler, false, 0, true);
    }

In this funtion the systemManager is null!

There, I hope I made myself clear :-)
Any help would be very very apreaciated.

Thank you,
Bounce

Reply via email to