2 Replies Latest reply on Mar 7, 2010 11:49 PM by vivoices

    setting Spark TextArea Skin in AS3 ?

    vivoices Level 1

      How do I set a custom skinClass ( Skins.Global.JRBTextAreaSkin ) for the spark TextArea component at runtime in AS3?

       

      Thanks,

      David

        • 1. Re: setting Spark TextArea Skin in AS3 ?
          Shongrunden Adobe Employee

          Using setStyle:

           

          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                         xmlns:s="library://ns.adobe.com/flex/spark">
              
              <fx:Script>
                  <![CDATA[
                      private function setSkinClass():void {
                          myTextArea.setStyle('skinClass', Skins.Global.JRBTextAreaSkin);
                      }
                  ]]>
              </fx:Script>
              
              <s:TextArea id="myTextArea" />
          </s:Application>
          
          
          • 2. Re: setting Spark TextArea Skin in AS3 ?
            vivoices Level 1

            Thanks Shongrunden,

            finally I used:

            TextAreaSkin( newText.skin ).background.visible = false;
            TextAreaSkin( newText.skin ).border.alpha = 0;
            TextAreaSkin( newText.skin ).shadow.alpha = 0;
            
            to make the background etc of the default skin for this instance invisible.
            David