ver1

by 0hhaaaa
♥0 | Line 34 | Modified 2014-06-19 18:58:38 | MIT License
play

ActionScript3 source code

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

package {
    
    import flash.display.*;
    import flash.events.*;
    import flash.text.*;
    import flash.geom.*;
    
    [SWF(width=800, height=600, backgroundColor=0x000000, frameRate=30)]

    
    public class Ver1 extends Sprite {
        
        public var label1:TextField;
        public var num:uint;
        public var rect:Rectangle;
        
        public function Ver1():void {
            
            rect = new Rectangle(0,0,800,600);
            
            stage.addEventListener(MouseEvent.MOUSE_MOVE,loop);

            label1 = new TextField();
            
            var Tf:TextFormat = new TextFormat();
            Tf.font = "Arial Tur";
            Tf.size = 12;
            Tf.color = 0x000000;
            Tf.bold = true;
            
            label1.defaultTextFormat = Tf;
            label1.x = 50;
            label1.y = 20;
            label1.autoSize = TextFieldAutoSize.LEFT;
            
            stage.addChild(label1);
            scrollRect = rect;
            
        }
        public function loop(e:Event):void{
            rect.x = mouseX;
            rect.y = mouseY;
            label1.text = "X: "+rect.x+", Y: "+rect.y;
            scrollRect = rect;
        }

    }
}

Forked