flash on 2010-1-5
/**
* Copyright sk4 ( http://wonderfl.net/user/sk4 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/406Q
*/
package{
import flash.display.Sprite;
import flash.events.MouseEvent;
import org.libspark.betweenas3.BetweenAS3;
[SWF(backgroundColor=0xffffff, frameRate=60)]
public class a extends Sprite{
public function a():void{
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
}
private function mouseUpHandler(e:MouseEvent):void{
var s:Stone = new Stone();
s.x = mouseX;
s.y = mouseY;
// .tween(Target, ToValues, FromValues, Time, Easing, Delay)
BetweenAS3.tween(s, {y: 320}, null, 2).play();
addChild(s);
}
}
}
import flash.display.Sprite;
class Stone extends Sprite{
public function Stone():void{
this.graphics.beginFill(0x0000);
this.graphics.drawCircle(0, 0, 10);
this.graphics.endFill();
}
}