3 Replies Latest reply on Aug 19, 2009 2:50 PM by flairjax

    Assigning states to properties via actionscript

    flairjax Level 1

      How would one go about setting states for generated objects, something like the following (i know this isn't correct):

       

      <s:states>

              <s:State name="normal" />

              <s:State name="disabled" />
      </s:states>

       

      for each( var filtername:String in _someArrayOfStrings )

      {

                          var lnkBtn:SpiceworksCustomLinkButton = new LinkButton();

                          lnkBtn.id = filtername + 'LinkButton';
                          lnkBtn.label = filtername;
                          lnkBtn.setStyle( 'fontSize', 11);

               ------> lnkBtn.enabled.disable = false; <--------
                          lnkBtn.addEventListener(MouseEvent.CLICK, onlinkButtonClick, false, 1 );

       

      .........ApplicationControlBar.addChild(lnkBtn)..................

       

      }