Creating a Background for a Text Field : background « TextField « Flash / Flex / ActionScript






Creating a Background for a Text Field

 

package {

  import flash.display.Sprite;
  import flash.text.TextField;
  public class Main extends Sprite {
    public function Main(  ) {
      var field:TextField = new TextField(  );
        field.background = true;
        field.backgroundColor = 0x00FFFF; // Set the background to light blue

      addChild(field);
    }
  }
}

        








Related examples in the same category

1.Create the TextField
2.Creating Backgrounds for a TextField