I believe the simplest way is to look in the generated code - it gives you the better understanding on both code and timing. The code would go like this:
..
    var style:CSSStyleDeclaration;
    style = StyleManager.getStyleDeclaration(".yourStyleName");
    if (!style)  {
     style = new CSSStyleDeclaration();
     StyleManager.setStyleDeclaration(".yourStyleName", style, false);
    }
    if (style.factory == null)
    {
     style.factory = function():void
     {
      this.paddingBottom = 0;
      this.paddingTop = 0;
     };
    }
 
 
Hope this helps,
Anatole Tartakovsky

----- Original Message -----
Sent: Thursday, March 23, 2006 11:29 AM
Subject: [flexcoders] How to create new custom Style in custom component?

Hi FlexCoders,

I'm wondering how I can create new custom style in my ActionScript
Component? And how to use it with StyleManager?

Can anybody point me to documentation where this topic is described?

Best regards
Stanislav


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




YAHOO! GROUPS LINKS




Reply via email to