it works in all mxml i have tried, just not able to do it in AS, so i must be doing something quite daft.

On 11/24/05, Johannes Nel < [EMAIL PROTECTED]> wrote:
hi Manish

this works in my index mxml page in the root of my project (i have not tried it for a deeper nested mxml page yet)
but setting the class name in the constructer of my AS object seems to have no effect, my build is 2.0.197

here is the constructer for my class, obviously its in a fairly nested package (doubt that makes a difference) and this class does extend UIComponent
       
public function MenuItem()
        {
            super();
            this.className = "MenuItem";
          
            trace("getStyle >>" + getStyle('background-color') + "@@ "+ getStyle('backgroundColor'));
        }

and here is the stylesheets declaration i am using

MenuItem{
    left-margin:5;
    right-margin:5;
    top-margin:5;
    botton-margin:5;
    background-color:#CEEBF9;
    rollover-color:#8EB0E8;
}


Thanks
j


On 11/21/05, Manish Jethani <[EMAIL PROTECTED] > wrote:
On 11/22/05, Johannes Nel <[EMAIL PROTECTED]> wrote:

>  in flex 1.5 when i compile in a sylesheet using the following that
[snip]

>  SomeName{
>  top-margin:5;
>  botton-margin:6;
>  }

>  then if i have some mxml component somewher in my app named SomeName

as of today, to get type selectors working for your own components,
you have to set the component's "className" property to the type name
you want to use.  In an AS component, you can do this in the
constructor.  In an MXML component, you can assign it on the root tag:

  <SomeName className="SomeName" ... >
    ...
  </SomeName>

we're hoping this requirement will go away before the release.

Manish


------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->

--
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

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/






--
j:pn



--
j:pn


--
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