0 Replies Latest reply: Feb 16, 2013 12:06 PM by jkat4466 RSS

    FlashBuilder 4.6 mx.controls.Button missing?

    jkat4466

      Im writing my first application in Flash Builder but I have much experience with Flash. I am trying to use the button class in flash builder but my error says "the imports button could not be found" (mx.controls.Button) I tried importing flash.display, flash.ui to see it Button was hidden somewhere else. The point is to dynamically load buttons and their labels via xml. Any help is appreciated. Thanks!

       

      <fx:Script>
          <![CDATA[
              import flash.events.*;
              import mx.controls.Button;

              private function doAdd(e:Event):void {

                  var buttonList:XMLList = new XMLList(cutsXML.cut.@name);
                  for(var i=0; i
      <buttonList.length(); i++){
                     
      var btn:Button = new Button();
                     
      btn.label = buttonList[i];
                     
      buttonBox.addElement(btn);
                  }
              }
          ]]
      >    
      </fx:Script>

      <s:VGroup left="30" right="30" top="50" bottom="30" id="buttonBox">
      </s:VGroup>