simple for Vovan

by tananuka13
♥0 | Line 21 | Modified 2010-08-13 19:14:54 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.MovieClip;
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.Event;
    public class FlashTest extends Sprite {
        
        public var spr:Sprite = new Sprite()
        
        public function FlashTest()
        {
            // write as3 code here..
            spr.graphics.beginFill(0xff0000)
            spr.graphics.drawRect(0,0,50,50)
            this.addChild(spr)
            spr.addEventListener(Event.ENTER_FRAME, update)
            
        }
        public  function update(e:Event):void
        {
            spr.x = Math.random()*100
            spr.y = Math.random()*100
        }
    }
}