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