In ActionScript you must write

 

    myUIObject.percentWidth = 100;

 

because the 'width' property is now typed as Number.

 

The MXML compiler translates the attribute

 

    < ... width="100" ... >

 

into

 

    myUIObject.width = 100;

 

and the attribute

 

    < ... width="100%" ... >

 

into

 

    myUIObject.percentWidth = 100;

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of Paul BH
Sent: Thursday, June 15, 2006 12:53 PM
To: [email protected]
Subject: [flexcoders] f2b3 setting width / height as a percentage in AS3

 

Hi,
in Flex 1.5 I could write in my actionscript code something like:

myUIObject.width = "100%";

and it would display just as if I had written:

<whatever id="myUIObject" width="100%"/>

is there a way to do this in AS3? The compiler isnt too happy with me
trying to set width to a string...

ta

PBH

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to