flash on 2011-9-9
♥0 |
Line 20 |
Modified 2011-09-09 05:25:09 |
MIT License
archived:2017-03-20 07:39:43
ActionScript3 source code
/**
* Copyright divillysausages ( http://wonderfl.net/user/divillysausages )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/p6T4
*/
package {
import flash.text.TextField;
import flash.events.KeyboardEvent;
import flash.display.Sprite;
public class FlashTest extends Sprite {
private var m_t:TextField = null;
public function FlashTest() {
// write as3 code here..
this.m_t = new TextField;
this.m_t.autoSize = "left";
this.addChild( this.m_t );
this.m_t.border = true;
this.m_t.text = String.fromCharCode( 72,69,76,76,79,32,87,79,82,76,68 );
this.stage.addEventListener( KeyboardEvent.KEY_DOWN, this._onKey );
}
private function _onKey( e:KeyboardEvent ):void
{
this.m_t.appendText( e.keyCode + "," );
}
}
}