[Papervision3D] png byte array decode

Trevor Burton worldofpaper at googlemail.com
Wed Jul 18 15:08:16 EDT 2007


if __loader is an instance of the Loader class then you won't get anything

you need to listen for events on the Loader's LoaderInfo property..

__loader.contentLoaderInfo.addEventListener(Event.INIT, onLoadComplete)

and then your content will be in the LoaderInfo's content property when
loading is complete

public/private function onLoadComplete(event:Event):void
{
    var content:ByteArray = __loader.contentLoaderInfo.content as ByteArray;
}

or something like that anyway...


On 7/18/07, Steven Hargrove <steven.hargrove at gmail.com> wrote:
>
> i thought of it more as a toss, than a fling, or perhaps a hop.
>
> Besides, whats stopping me from asking a C++ question? Sure, that would be
> pretty lame, but why does it matter, lol? That statement makes no sense
> anyways, as his question was about AS3 which IS related to papervision. For
> all we know, his question is related to making some sort of material.
>
> Anyway, I was just kidding around, you need to chill out dude!
>
> On 7/18/07, Collin Cusce <rafajafar at gmail.com > wrote:
> >
> > Steve, would you post to a list about OpenGL questions about C++ or
> > Java? I sure wouldn't.
> >
> > I'm not the "governator" I already helped him with his vague question.
> > You're telling me to lay off him, I'm asking you to lay off me. I made a
> > good point. I dont know what else to say except, if you care so much, help
> > him out with his question instead of flinging names at me.
> >
> > On 7/18/07, Steven Hargrove < steven.hargrove at gmail.com> wrote:
> > >
> > > wow collin since when did you become the governator? chill the hell
> > > out, its AS3 related, it counts. That's like saying "this is a pv3d list,
> > > stop mentioning A3D"
> > >
> > > On 7/18/07, Collin Cusce <rafajafar at gmail.com> wrote:
> > > >
> > > > This really isnt the right list to be asking this.
> > > >
> > > > On 7/18/07, Matthew Levy < matthew.levy at dubitlimited.com > wrote:
> > > > >
> > > > >  sorry... hit the damn enter key there.... anyhow.... heres part
> > > > > of the code.... the problem is the loader is loading a png and i need to
> > > > > pass the bitmap data in additem function... whenever i use the loader class
> > > > > it seems to just pass an empty bitmap becuase the content of the loader is
> > > > > actually null. ...
> > > > > __loader.addEventListener(Event.COMPLETE,onPreloaderItemLoaded,
> > > > > *false*);
> > > > > __loader.addEventListener( IOErrorEvent.IO_ERROR ,handleIOError, *
> > > > > false*);
> > > > > __loader.addEventListener(HTTPStatusEvent.HTTP_STATUS
> > > > > ,handleHTTPStatus,*false* );
> > > > > __loader.dataFormat = URLLoaderDataFormat.BINARY;
> > > > > ... *
> > > > >
> > > > > public
> > > > > **function* onPreloaderItemLoaded(e:E*vent*)*:void {
> > > > > ....
> > > > > renderer.addItem(bitmap,
> > > > > ...
> > > > > **}*
> > > > >
> > > > >
> > > > > On 18/07/07, Collin Cusce <rafajafar at gmail.com > wrote:
> > > > > >
> > > > > > create a new bitmapdata and pass the byte array in or set the
> > > > > > public member variable to your byte array.
> > > > > >
> > > > > > On 7/18/07, Matthew Levy < matthew.levy at dubitlimited.com> wrote:
> > > > > > >
> > > > > > > hey.... does anyone know, or heard of a class to decode a png
> > > > > > > byte array into bitmap data? i've got a png loaded in with the urlloader
> > > > > > > class and i cant use the loader.loadbyte array fruntion to
> > > > > > > render the png data cause i want to pass the bitmap to another renderer
> > > > > > > (that basically composites a load of images together)
> > > > > > > _______________________________________________
> > > > > > > Papervision3D mailing list
> > > > > > > Papervision3D at osflash.org
> > > > > > > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > Papervision3D mailing list
> > > > > > Papervision3D at osflash.org
> > > > > > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> > > > > >
> > > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Papervision3D mailing list
> > > > > Papervision3D at osflash.org
> > > > > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> > > > >
> > > > >
> > > >
> > > > _______________________________________________
> > > > Papervision3D mailing list
> > > > Papervision3D at osflash.org
> > > > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Steven Hargrove
> > > stevenhargrove.com
> > > _______________________________________________
> > > Papervision3D mailing list
> > > Papervision3D at osflash.org
> > > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> > >
> > >
> >
> > _______________________________________________
> > Papervision3D mailing list
> > Papervision3D at osflash.org
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >
> >
>
>
> --
> Steven Hargrove
> stevenhargrove.com
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>


-- 
Trevor Burton
http://www.paperworld3d.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070718/270b3795/attachment.html 


More information about the Papervision3D mailing list