2010年11月14日
摘要: private function onEnterFrame(event:Event):void { for (var i:uint = 0; i stage.stageWidth) { ball.x = stage.stageWidth - ball.radius; ball.vx *= bou... 阅读全文
posted @ 2010-11-14 23:06 真阿当 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1)何时停止缓动:private function onEnterFrame(event : Event) : void {var dx:Number = targetX - ball.x;if (Math.abs(dx) < 1){ball.x = targetX;removeEventList... 阅读全文
posted @ 2010-11-14 13:20 真阿当 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1)力作用于速度,而不是距离:vx += ax;vy += ay;ball.x += vx;ball.y += vy; 2) 反弹:if(ball.x + ball.radius > right){ball.x = right - ball.radius;vx *= -1; (无能量损失,如果有... 阅读全文
posted @ 2010-11-14 11:41 真阿当 阅读(310) 评论(0) 推荐(0) 编辑