so it seems I may have been listening for the wrong event...
Things seem to work when I listen for Event.UPDATE_COMPLETE rather
than just Event.COMPLETE. I guess that makes sense...
It always seems the minute I hit send, I answer my own questions...
- Kevin
On Nov 3, 2007, at 10:50 AM, Kevin wrote:
I seems to have encountered a bug while using the source property
of the Image container. Before I file a bug report I want to see
if I am possibly doing something wrong.
I tried two different tests:
1) create an image component with id="myImage" source="some/url/
string.jpg" and then listen for Event.COMPLETE on the myImage object
2) create an image component with id="myImage" source="{new Bitmap
()}" and then listen for Event.COMPLETE on the myImage object
The event fires properly with the url string (1), but not with a
bitmap(2). If you look at the SWFLoader code line 1220 if the
source is a "DisplayObject" then no event get's fired...
line 1220
else if (classOrString is DisplayObject)
{
contentHolder = child = DisplayObject(classOrString);
addChild(child);
contentLoaded();
}
The problem with this is the even when loading a bitmap one still
needs to wait for the bitmap to be fully loaded before accessing
some of it's properties (height/width). Is this a bug and if so,
is there a workaround OR am I approaching this the wrong way?
Thanks, Kevin