circle = new CircleAnimation(block); circle.setRadius(50); circle.setAngle(180); circle.setAngleIncrement(10); circle.sleep(20);
circle.playAnimation();
var listener = { onmove : function(e) { var me = e.getSource(); var a= me.getDirectionAngle(); me.setFrame(Math.floor(a/22)) } } block.addEventListener(listener);