Re: [flexcoders] Re: BitmapData source for mx:Image

2008-06-10 Thread Josh McDonald
Can you copy and paste the actual source for MyThumbnail.mxml?

On Tue, Jun 10, 2008 at 4:32 PM, limhy0306 [EMAIL PROTECTED] wrote:

   Hi,

 Yes, the Bitmapdata is something that changes with time.
 Initially, the Bitmapdata is of size 176x144; but as time moves on,
 it is possible that any one of the Bitmapdata could change to size
 352x288.

 The Image component is used as the ItemRenderer for a TileList.

 mx:TileList
 id=tileListThumbnails
 dataProvider={imgMgr.thumbnailList}
 width=100% height=100%
 columnWidth=192
 rowHeight=180
 selectedIndex=-1
 minHeight=0
 itemRenderer=MyThumbnail/


 thanks.

 regards,
 hy

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  Is the bitmap data something that changes as time goes on, or is it
 set for
  each row? I assume there are rows as you're using data.foo, let me
 know if
  I'm wrong. Is this a renderer in a DataGrid, or a List, or?
 Sounds like
  you'll probably have to quit relying on binding and set the fields
 required
  from an event handler, but without more context there's not much
 more help I
  can give.
 
  -Josh
 
  On Fri, Jun 6, 2008 at 12:00 PM, limhy0306 [EMAIL PROTECTED] wrote:
 
   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 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com, Josh
   McDonald dznuts@ 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 limhy0306@ wrote:
   
 Hi,

 I would say the 2nd option - The Bitmap is growing out of
 the
 Image component.


 --- In flexcoders@yahoogroups.com 
 flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.comflexcoders%

   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.comflexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.comflexcoders%
   40yahoogroups.comflexcoders%
 40yahoogroups.com, Alex
   Harui aharui@ wrote:
   
Try setting columnWidth rowHeight to 176 and 144
   
   
   

   
From: 
flexcoders@yahoogroups.comflexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.comflexcoders%
   40yahoogroups.comflexcoders%
 40yahoogroups.com
   [mailto:flexcoders@yahoogroups.comflexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.comflexcoders%
   40yahoogroups.comflexcoders%
 40yahoogroups.com] On
Behalf Of limhy0306
Sent: Thursday, May 29, 2008 1:41 AM
To: 
flexcoders@yahoogroups.comflexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.comflexcoders%
   40yahoogroups.comflexcoders%
  
 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
   

Re: [flexcoders] Re: BitmapData source for mx:Image

2008-06-05 Thread Josh McDonald
Is the bitmap data something that changes as time goes on, or is it set for
each row? I assume there are rows as you're using data.foo, let me know if
I'm wrong. Is this a renderer in a DataGrid, or a List, or? Sounds like
you'll probably have to quit relying on binding and set the fields required
from an event handler, but without more context there's not much more help I
can give.

-Josh

On Fri, Jun 6, 2008 at 12:00 PM, limhy0306 [EMAIL PROTECTED] wrote:

   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 flexcoders%40yahoogroups.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.comflexcoders%
 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.comflexcoders%
 40yahoogroups.comflexcoders%
   40yahoogroups.com, Alex
 Harui aharui@ wrote:
 
  Try setting columnWidth rowHeight to 176 and 144
 
 
 
  
 
  From: flexcoders@yahoogroups.com 
  flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.comflexcoders%
   40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com 
 flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.comflexcoders%
   40yahoogroups.com] On
  Behalf Of limhy0306
  Sent: Thursday, May 29, 2008 1:41 AM
  To: flexcoders@yahoogroups.com 
  flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.comflexcoders%

   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]
 

  




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

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


Re: [flexcoders] Re: BitmapData source for mx:Image

2008-06-03 Thread Josh McDonald
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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote:
  
   Hi,
  
   I've tried it; but it still doesn't work!
  
   Thank you.
  
   Regards,
   hy
  
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com, Alex
   Harui aharui@ wrote:
   
Try setting columnWidth rowHeight to 176 and 144
   
   
   

   
From: flexcoders@yahoogroups.com 
flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com
   [mailto:flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com] On
Behalf Of limhy0306
Sent: Thursday, May 29, 2008 1:41 AM
To: flexcoders@yahoogroups.com 
flexcoders%40yahoogroups.comflexcoders%
 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 :: [EMAIL PROTECTED]
 
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 

  




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

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


Re: [flexcoders] Re: BitmapData source for mx:Image

2008-06-01 Thread Josh McDonald
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 [EMAIL PROTECTED] wrote:

   Hi,

 I've tried it; but it still doesn't work!

 Thank you.

 Regards,
 hy


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex
 Harui [EMAIL PROTECTED] wrote:
 
  Try setting columnWidth rowHeight to 176 and 144
 
 
 
  
 
  From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
  Behalf Of limhy0306
  Sent: Thursday, May 29, 2008 1:41 AM
  To: flexcoders@yahoogroups.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 :: [EMAIL PROTECTED]


Re: [flexcoders] Re: BitmapData source for mx:Image

2008-06-01 Thread Josh McDonald
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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote:

   Hi,

 I've tried it; but it still doesn't work!

 Thank you.

 Regards,
 hy


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex
 Harui [EMAIL PROTECTED] wrote:
 
  Try setting columnWidth rowHeight to 176 and 144
 
 
 
  
 
  From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
  Behalf Of limhy0306
  Sent: Thursday, May 29, 2008 1:41 AM
  To: flexcoders@yahoogroups.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 :: [EMAIL PROTECTED]




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

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