Hi -

Just keep in mind that you should set your initial styles using the
styles tag, then use the ActionScript setStyle() method to change styles
when necessary (i.e. on event change)  as the setStyle method actually
has a lot of processor overhead (has to go search through all objects
etc.)

regards,

Edward Apostol, consultant
certified Adobe Instructor - Flex, Flash, ColdFusion, Dreamweaver,
Breeze/Connect
New Toronto Group
http://www.newyyz.com


--- In [email protected], "Andrew Trice" <[EMAIL PROTECTED]>
wrote:
>
> In actionscript you can also use the setStyle method to
programmatically
> set any of the styles for that element.
>
>
>
> myTextBox.setStyle("color", 0xFF0000);
>
>
>
>
>
> -Andy
>
>
>
> _____________________________________
>
> Andrew Trice
>
> Cynergy Systems, Inc.
>
> http://www.cynergysystems.com
>
>
>
> Blog: http://www.cynergysystems.com/blogs/page/andrewtrice
>
> Email: [EMAIL PROTECTED]
>
> Office: 866-CYNERGY
>
>
>
> ________________________________
>
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of amey admulwar
> Sent: Monday, December 04, 2006 4:29 AM
> To: [email protected]
> Subject: Re: [flexcomponents] adding a CSS programmatically in ".as"
> file ?
>
>
>
> Hi Arpan
>
> You can do this in .as file  by just creating CSS classes in action
> script. by contol name
>
> Text
> {
>     color : #ffffff;
>     ...
> };
>
> or
> .class_name
> {
>     color : #ffffff;
>     ...
> }
>
> and just set style Name attribut in resp. control
styleName="class_name"
> it will work just same as <mx:Script> tag
>
> Amey.
>
>
>
>
> Amey.
>
> arpan srivastava [EMAIL PROTECTED] wrote:
>
>  Hi,
>      Is there anyway we can add CSS programmatically  in ".as"
> file rather than adding in the mxml file with <mx:style />  tag.
>
>
>
>
> ________________________________
>
>
>  Access over 1 million songs - Yahoo! Music Unlimited.
>
<http://pa.yahoo.com/*http:/us.rd.yahoo.com/evt=36035/*http:/music.yahoo
> .com/unlimited/>
>
>
>
>
>
> ________________________________
>
> Everyone is raving about the all-new Yahoo! Mail beta.
>
<http://us.rd.yahoo.com/evt=45083/*http:/advision.webevents.yahoo.com/ma
> ilbeta>
>

Reply via email to