In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

flash on 2011-4-23

Get Adobe Flash player
by yuugurenote 23 Apr 2011
    Embed
/**
 * Copyright yuugurenote ( http://wonderfl.net/user/yuugurenote )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/eu7c
 */

package {
    import flash.display.Sprite;
    import flash.events.Event;
    public class FlashTest extends Sprite {
        var mySprite:Sprite = new Sprite();        
        
        public function FlashTest() {
            // write as3 code here..
            mySprite.graphics.beginFill(0xC1F1F1F,1);
            mySprite.graphics.drawRect(0,0,10,10);
            mySprite.graphics.beginFill();
            addChild(mySprite);
            mySprite.addEventListener(Event.ENTER_FRAME,xEnter);
            function xEnter(e:Event):void {                        
            mySprite.x += (mouseX - mySprite.x)/8;
            mySprite.y += (mouseY - mySprite.y)/8;
            }
        }


    }
}