Yup that did it - thanks very much Alex.

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Should be:
>
> private var CarouselLoader:Loader;
> ...
>
> var tmpByteArray:ByteArray = myDBObject.thumb;
> CarouselLoader = new Loader();
> CarouselLoader.contentLoaderInfo.addEventListener(
> Event.COMPLETE,bitmapLoaded);
> CarouselLoader.loadBytes(tmpByteArray);
> ...
>
> private function bitmapLoaded():void{
>         ....do something here....
> }
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of mike_hodgson
> Sent: Friday, August 01, 2008 9:40 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Loader Complete Event not firing for loadBytes
>
>
>
> I have a ByteArray object that's loaded from a local database (SQLite
> db) which represents a JPG file.  I need to load the ByteArray into a
> Bitmap object for eventual loading into a
> org.papervision3d.materials.BitmapMaterial object (I want to show the
> JPG in a Carousel).  I'm having a bit of trouble getting the ByteArray
> into the Bitmap using a Loader.
>
> The COMPLETE event for the loader does not fire.
>
> Using the debugger, I've checked the Loader and the content is null,
but
> the contentLoaderInfo has several entries.  What concerns me is that
> several of the contentLoaderInfo entries state:  "Error #2099: The
> loading object is not sufficiently loaded to provide this
information."
> I'm not sure if I should be concerned with this  - or how to fix it.
>
> I noticed a similar entry that described a
>
<http://www.nabble.com/Event.COMPLETE-seems-doesn%27t-fire-for-SWFLoader
> -component%21-td17515426.html#a17515556> problem with SWFs
>
<http://www.nabble.com/Event.COMPLETE-seems-doesn%27t-fire-for-SWFLoader
> -component%21-td17515426.html#a17515556>   (as opposed to JPG), but
> there was no resolution
>
> private var CarouselLoader:Loader;
> ...
>
> var tmpByteArray:ByteArray = myDBObject.thumb;
> CarouselLoader = new Loader();
> CarouselLoader.addEventListener( Event.COMPLETE,bitmapLoaded);
> CarouselLoader.loadBytes(tmpByteArray);
> ...
>
> private function bitmapLoaded():void{
>         ....do something here....
> }
>
> (I pulled this code from the
>
<http://www.nabble.com/Convert-ByteArray-to-Bitmap-td13542102.html#a1354
> 2102> entry
>
<http://www.nabble.com/Convert-ByteArray-to-Bitmap-td13542102.html#a1354
> 2102>  : )
>


Reply via email to