Just instantiate a UIComponent that supports graphics(), use the bitmap data
as an image fill, and draw a 100x100 rectangle in it. That should work.

-Josh

On Wed, Jun 18, 2008 at 9:50 AM, flexawesome <[EMAIL PROTECTED]> wrote:

> right, I tried to use the image component and doesn't display it for
> me as well.
>
> What shall I add for the code?
>
> --- In [email protected], "Josh McDonald" <[EMAIL PROTECTED]> wrote:
> >
> > Right, gotcha. BitmapData.getPixels returns a ByteArray of pixel
> data, which
> > would just be a width * height array of raw 32 bit ARGB (or maybe
> RGBA,
> > can't rememeber) uint data. swfLoader expects a filename, url or
> classname,
> > or the ByteArray of an actual GIF / JPG / PNG / SWF / etc file. If
> you
> > encoded your raw data to one of those formats first it should work,
> but I'm
> > wondering why you want to pass it to SwfLoader in the first place?
> There's
> > probably an easier way to do whatever it is that's your end goal :)
> >
> > -Josh
> >
> >
> >
> > On Tue, Jun 17, 2008 at 11:16 PM, flexawesome <[EMAIL PROTECTED]>
> wrote:
> >
> > >   I was loading a image by using swfLoader
> > >
> > >
> > > --- In [email protected] <flexcoders%
> 40yahoogroups.com>, "Josh
> > > McDonald" <dznuts@> wrote:
> > > >
> > > > You're trying to load a bunch of pixels as a swf or something?
> > > >
> > > > On Tue, Jun 17, 2008 at 11:42 AM, flexawesome <flexawesome@>
> > > wrote:
> > > >
> > > > > any suggestions?
> > > > >
> > > > > --- In [email protected] <flexcoders%
> 40yahoogroups.com><flexcoders%
> > > 40yahoogroups.com>,
> > > > > "flexawesome" <flexawesome@>
> > > > > wrote:
> > > > >
> > > > > >
> > > > > > Hi there,
> > > > > >
> > > > > > I was trying to capture my UI at w:100 , h:100. I got an
> error
> > > msg
> > > > > of
> > > > > >
> > > > > > -----------
> > > > > > Error #2044: Unhandled IOErrorEvent:. text=Error #2124:
> Loaded
> > > file
> > > > > is
> > > > > > an unknown type.
> > > > > > ------------
> > > > > >
> > > > > > Any suggestions? Thanks
> > > > > >
> > > > > >
> > > > > > var bitmapData:BitmapData = new BitmapData(100, 100)
> > > > > > bitmapData = ImageSnapshot.captureBitmapData( UI );
> > > > > > var bounds:Rectangle = new Rectangle ( 0 , 0 , 100 ,100 );
> > > > > > swfLoader.source = ( bitmapData.getPixels( bounds ) as
> > > ByteArray );
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > "Therefore, send not to know For whom the bell tolls. It tolls
> for
> > > thee."
> > > >
> > > > :: Josh 'G-Funk' McDonald
> > > > :: 0437 221 380 :: josh@
> > > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > "Therefore, send not to know For whom the bell tolls. It tolls for
> thee."
> >
> > :: Josh 'G-Funk' McDonald
> > :: 0437 221 380 :: [EMAIL PROTECTED]
> >
>
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>
>


-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]

Reply via email to