flash on 2011-6-16

by Thy
♥0 | Line 28 | Modified 2011-06-16 12:21:10 | MIT License
play

ActionScript3 source code

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

package {
    import flash.events.Event;
    import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        
        public var t:TextField = new TextField();
        public var t2:TextField = new TextField();
        public var t3:TextField = new TextField();
        
        
        public function FlashTest() {
            // write as3 code here..
            
            this.addChild(t);
            this.addChild(t2);
            this.addChild(t3);
            
            t.border = t2.border = true;
            
            t.type = t2.type = "input";
            
            t.width = t2.width = t3.width = 465;
            t.height = t2.height = t3.height = 150;
            
            t2.y = 150;
            t3.y = 300;
            
            this.addEventListener(Event.ENTER_FRAME, ef);
            
            
        }
        
        private function ef (e:Event):void
        {
            
            var hrs:Number = Number(t.text);
            var min:Number = Number(t2.text);
            
            t3.text = String( hrs * 60 + min);
            
            
            
            
        }

    }
}