Skip navigation
jkat4466
Currently Being Moderated

FlashBuilder 4.6 mx.controls.Button missing?

Feb 16, 2013 12:06 PM

Tags: #flash #script #action #3 #builder

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>

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points