To modify a label of a custom made button of type Button (which belongs to the SimpleButton class), assuming that this button is called myLabel, we can do the following:
// we need the Sprite class from the display package and the TextField class from the text package import flash.display.Sprite; import flash.text.TextField; // we declare the states that we want to modify, read/write proprieties of the SimpleButton class var aStates:Array = ["upState", "overState", "downState"]; var str:String = "My New Text Label";
// avem nevoie de clasa Sprite din pachetul display si de clasa TextField din pachetul text import flash.display.Sprite; import flash.text.TextField; // declaram starile pe care dorim sa le modificam, proprietati read/write ale calsei SimpleButton var aStates:Array = ["upState", "overState", "downState"]; var str:String = "My New Text Label"; // parcurgem starile for each(var _st