テンプレート

by riafeed
♥0 | Line 40 | Modified 2010-12-19 11:42:05 | MIT License
play

ActionScript3 source code

/**
 * Copyright riafeed ( http://wonderfl.net/user/riafeed )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/idqb
 */

/*
テンプレート
*/
package {
    import com.adobe.serialization.json.JSON;
    import flash.display.Sprite;
    import flash.display.Sprite;
    import com.bit101.components.PushButton;
    import flash.events.Event;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.text.TextField;
    import flash.text.TextFieldType;

    public class FlashTest extends Sprite {
        private var _text:TextField;
        private var _input:TextField;
        private var _btn:PushButton;
        
        public function FlashTest():void 
        {
            if (stage) init();
            else addEventListener(Event.ADDED_TO_STAGE, init);
        }
        
        private function init(e:Event = null):void 
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
            // entry point
            
            _input = new TextField();
            _input.type = TextFieldType.INPUT;
            _input.border = true;
            _input.borderColor = 0x999999;
            _input.height = 20;
            _input.width = 300;
            addChild(_input);
            
            _btn = new PushButton(stage, 305, 0, "load", PushEventHandler);
            
            _text = new TextField();
            _text.width = _text.height = 465;
            _text.wordWrap = true;
            _text.y = 20;
            addChild(_text);
        }
        
        public function PushEventHandler(e:Event):void {
        
        }

    }
}