Hi, 

I've tried your suggestion; but unfortunately it still didn't work.
I've got a warning saying:
Unable to bind to property width...; class is not an 
IEventDispatcher...

Thanks.

Regards,
hy


--- In flexcoders@yahoogroups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> Try this:
> 
> <mx:Image width="176" height="144" id="imgDisplay"
> scaleContent="true"
> maintainAspectRatio="true"
> maxWidth="176"
> maxHeight="144">
> <mx:source>
> <display:Bitmap width="{data.thumbBmpData.width}"
> height="{data.thumbBmpData.height}"
> bitmapData="{data.thumbBmpData}"/>
> 
> </mx:source>
> </mx:Image>
> Might fix it. But like I said, I'm just guessing :) Also try it 
without the
> width and height on the display:bitmap altogether.
> 
> -Josh
> 
> On Tue, Jun 3, 2008 at 5:03 PM, limhy0306 <[EMAIL PROTECTED]> wrote:
> 
> >   Hi,
> >
> > I would say the 2nd option -> The Bitmap is "growing out" of the
> > Image component.
> >
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com>, "Josh
> > McDonald" <dznuts@> wrote:
> > >
> > > Are you getting a layout change, or does the bitmap sort of
> > just "grow out"
> > > of where the image component was like it's colouring outside the
> > lines?
> > >
> > > On Mon, Jun 2, 2008 at 1:28 PM, Josh McDonald <josh@> wrote:
> > >
> > > > This is a guess, but:
> > > >
> > > > When the binding updates the bitmapData on your mx:bitmap, 
it's
> > not
> > > > updating the width and height of that mx:bitmap component. The
> > Image see the
> > > > mx:bitmap is the same size, so paints it directly in rather 
than
> > scaling it
> > > > to fit.
> > > >
> > > > -J
> > > >
> > > >
> > > > On Mon, Jun 2, 2008 at 1:17 PM, limhy0306 <limhy0306@> wrote:
> > > >
> > > >> Hi,
> > > >>
> > > >> I've tried it; but it still doesn't work!
> > > >>
> > > >> Thank you.
> > > >>
> > > >> Regards,
> > > >> hy
> > > >>
> > > >>
> > > >> --- In flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com><flexcoders%
> > 40yahoogroups.com>, "Alex
> > > >> Harui" <aharui@> wrote:
> > > >> >
> > > >> > Try setting columnWidth rowHeight to 176 and 144
> > > >> >
> > > >> >
> > > >> >
> > > >> > ________________________________
> > > >> >
> > > >> > From: flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com><flexcoders%
> > 40yahoogroups.com>
> > > >> [mailto:flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com><flexcoders%
> > 40yahoogroups.com>] On
> > > >> > Behalf Of limhy0306
> > > >> > Sent: Thursday, May 29, 2008 1:41 AM
> > > >> > To: flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com><flexcoders%
> > 40yahoogroups.com>
> >
> > > >> > Subject: [flexcoders] BitmapData source for mx:Image
> > > >> >
> > > >> >
> > > >> >
> > > >> > Hi,
> > > >> >
> > > >> > I've encountered the following problem when using 
BitmapData as
> > > >> > source for mx:Image:
> > > >> >
> > > >> > <mx:Image width="176" height="144" id="imgDisplay"
> > > >> > scaleContent="true"
> > > >> > maintainAspectRatio="true"
> > > >> > maxWidth="176"
> > > >> > maxHeight="144">
> > > >> > <mx:source>
> > > >> > <display:Bitmap width="176" height="144"
> > > >> > bitmapData="{data.thumbBmpData}"/>
> > > >> > </mx:source>
> > > >> > </mx:Image>
> > > >> >
> > > >> > This Image component is a Renderer for a TileList which is
> > used to
> > > >> > show a list of images. The DataProvider to the TileList is 
a
> > class
> > > >> > ThumbnailData -> which stores thumbBmpData: BitmapData.
> > > >> >
> > > >> > I have no problem displaying the images when the 
BitmapData is
> > > >> > 176x144.
> > > >> >
> > > >> > However, when any one of the image changes its BitmapData 
to a
> > > >> bigger
> > > >> > size (e.g. 352x288)
> > > >> > -> that image suddenly expands to 352x288; instead of 
getting
> > > >> scaled
> > > >> > to fit into 176x144.
> > > >> >
> > > >> > Anyone encountered this problem before?
> > > >> >
> > > >> > Thank you very much.
> > > >> >
> > > >> > Regards,
> > > >> > HY
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > "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 :: josh@
> > >
> >
> >  
> >
> 
> 
> 
> -- 
> "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