1 Reply Latest reply on Aug 16, 2006 4:21 AM by alisonspiegel

    setting styles on a button

    alisonspiegel
      I'm using a button component in Flash MX 2004. I've succeeded in pulling in the Sample theme instead of the standard Halo. I can set certain styles, like color and fontFamily, but I can't figure out how to set the backgroundColor or borderStyle. I read that some of that is dependent on the RectBorder class but I don't know how to get to that. Does anyone have a code sample? If so, thanks.
        • 1. Re: setting styles on a button
          alisonspiegel Level 1
          Again, can anyone help me with this?

          I have this code attached to a button:

          onClipEvent(load) {
          label = _parent.label;
          setStyle("color", "0x00ff00");
          setStyle("fontFamily", "Arial");
          setStyle("fontWeight", "bold");
          setStyle("background", "true");
          setStyle("backgroundColor", 0xff0000);
          setStyle("border", "true");
          setStyle("borderStyle", "outset");
          }

          The color and font things work, but the border and background do not. I'm using the Sample theme.

          Thanks.