[flexcoders] load an image inside a UIComponent

2007-10-29 Thread flashcrow2000
Hello,

I have the following situation: I have an AS class which extends
UIComponent, and based on some settings read from an xml, I must load
an image, a movie or display a text inside that class.

When I'm creating the image, and adding it with addChild(imageObject),
if I don't set some values for width and height, it will not display.
Can I find out the original width and height of the picture after it
has been displayed this way?

As a quick remark, if I use parent.addChild(imageObject) (where parent
is Application), the image displays without any width and height set
(i'm using Flex 2), but i would like to have each picture displayed
inside the corresponding class.

Thanks!



RE: [flexcoders] load an image inside a UIComponent

2007-10-29 Thread Alex Harui
Use swfloader?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of flashcrow2000
Sent: Monday, October 29, 2007 2:15 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] load an image inside a UIComponent

 

Hello,

I have the following situation: I have an AS class which extends
UIComponent, and based on some settings read from an xml, I must load
an image, a movie or display a text inside that class.

When I'm creating the image, and adding it with addChild(imageObject),
if I don't set some values for width and height, it will not display.
Can I find out the original width and height of the picture after it
has been displayed this way?

As a quick remark, if I use parent.addChild(imageObject) (where parent
is Application), the image displays without any width and height set
(i'm using Flex 2), but i would like to have each picture displayed
inside the corresponding class.

Thanks!