13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Working with AIR native windows<br />

import flash.display.Sprite;<br />

import flash.display.StageDisplayState;<br />

import flash.text.TextField;<br />

import flash.text.TextFormat;<br />

public class FullScre<strong>en</strong>TerminalExample ext<strong>en</strong>ds Sprite<br />

{<br />

public function FullScre<strong>en</strong>TerminalExample():void<br />

{<br />

var terminal:TextField = new TextField();<br />

terminal.multiline = true;<br />

terminal.wordWrap = true;<br />

terminal.selectable = true;<br />

terminal.background = true;<br />

terminal.backgroundColor = 0x00333333;<br />

exit.\n_";<br />

}<br />

}<br />

this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;<br />

addChild(terminal);<br />

terminal.width = 550;<br />

terminal.height = 400;<br />

terminal.text = "Welcome to the dumb terminal application. Press the ESC key to<br />

var tf:TextFormat = new TextFormat();<br />

tf.font = "Courier New";<br />

tf.color = 0x00CCFF00;<br />

tf.size = 12;<br />

terminal.setTextFormat(tf);<br />

terminal.setSelection(terminal.text.l<strong>en</strong>gth - 1, terminal.text.l<strong>en</strong>gth);<br />

Last updated 6/6/2012<br />

917

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!