i want my shape when hit with inside of stage , rotate and countinue move in true angle forever <p>![My Map][1]</p> <p>i want simulate Billiard ball in my project. but my code does not work good. when start with (for example) 34 degree , when hit with wall(stage in this example) return with true degree. in flash , as3</p> <pre><code>public function loop(e:Event) : void { if(luanch) { y += Math.sin(degreesToRadians(rotation)) * speed; x += Math.cos(degreesToRadians(rotation)) * speed; if (x &gt; stage.stageWidth){ rotation -= 90; x = stage.stageWidth; trace("X :" , x , rotation); } else if (x &lt; 0) { rotation += 90; x=3; //rotation += 90; trace("X :" , x , rotation); } if (y &gt; stage.stageHeight) { y = stage.stageHeight; rotation -= 90; trace("Y : " , y , rotation); } else if (y &lt;0) { rotation += 90; //rotation += 90; trace("Y :" , y , rotation); } } } public function degreesToRadians(degrees:Number) : Number { return degrees * Math.PI / 180; } } } </code></pre>