Without much code could it be as simple as adding this or parent?
background.width = this.width; // Here is the ERROR background.width = parent.width; // Here is the ERROR On Jul 21, 2009 4:16pm, Robert Green <[email protected]> wrote:
I am trying to simply add a TileList component to my application.
The error I am getting is that nasty Error: #1009:
Main Thread (Suspended: TypeError: Error #1009: Cannot access a property or method of a null object
reference.)
fl.containers::BaseScrollPane/drawBackground
fl.controls::TileList/draw
fl.core::UIComponent/callLaterDispatcher
After review, the error occurs in the
fl/containers/BaseScrollPane.as file on line 983. This is because the following
method:
var
bg:DisplayObject = background;
background = getDisplayObjectInstance(getStyleValue("skin")); // This returns a NULL
background.width
= width; // Here is the ERROR
because I try to use a property of a NULL object.
//---------------------------
I figured that
this is something to do with the application trying to draw the TileList before
its time, or something to that effect. I have no trouble adding a
TileList component using Flash CS3 but in this application it is complete as
with NO Flash intervention nor any MXML files, therefore dragging a component
to the stage is not an option.
//----------------------------
Has anyone run
into a similar issue. In the above example, I am simply using an AS file
attempting to add a TileList component to the stage. When I invoke the
addChild(TileListComponentInstance) is when I get the above error. If I comment
out this line (addChild) I will not get an error.!?!?
HEEEEEELLLLLLLLLLPPPPPPPPPPPPPPPP!!!!
:/0
Thanks,
Rob Green
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by FusionLink
-------------------------------------------------------------
