Flash / Flex / ActionScript/TextField/mouseWheel

Материал из Web эксперт
Перейти к: навигация, поиск

Enable mouse wheel

 
package {
  import flash.display.Sprite;
  import flash.text.TextField;
  public class Main extends Sprite {
    public function Main(  ) {
        var field:TextField = new TextField(  );
        field.mouseWheelEnabled = true;
        field.autoSize = flash.text.TextFieldAutoSize.LEFT;
        field.wordWrap = true;
        field.text = "AAA BBB CCC DDD AAA BBB CCC DDD AAA BBB CCC DDD AAA BBB CCC DDD";
        addChild(field);
    }
  }
}