Bounce not Working

Hello there

I have recently started Learning Actionscript 3.0 out of my own interest.
I was trying on making a ball bounce off the edges of the stage using the Actionscript 3.0. But the code not working.

The Ball happens to move on X and Y, till it hits the end of the stage, and then it just does not reverse its direction to give the effect of bounce, it gets stuck to the X axis and moves out of the stage.

I tried to make changes, but failed.
If some can tell me what may be the error, coz i am really not able to figure it out.
Thanks a lot in Advance

Here is the codeā€¦

[FONT=Courier New]------------------Code-------------------[/FONT]
[FONT=Courier New][COLOR=blue]function bounceBall(evt:Event):void {[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]var vx:Number=Math.random()*10+5;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]var vy:Number=Math.random()*10+5;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]var radius:Number=mcBall.height/2;[/COLOR][/FONT]

[FONT=Courier New][COLOR=blue]var top:Number=0;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]var bottom:Number=stage.stageHeight;[/COLOR][/FONT]

[FONT=Courier New][COLOR=blue]var left:Number=0;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]var right:Number=stage.stageWidth;[/COLOR][/FONT]

[FONT=Courier New][COLOR=blue]var bounce:Number=0.7;[/COLOR][/FONT]

[FONT=Courier New][COLOR=blue]mcBall.x+=vx;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]mcBall.y+=vy;[/COLOR][/FONT]

[FONT=Courier New][COLOR=blue]if (mcBall.y+radius>bottom) {[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]mcBall.y=bottom-radius;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]vy*=-1 * bounce;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]} else if (mcBall.y-radius<top) {[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]mcBall.y=top+radius;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]vy*=-1* bounce;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]}[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]if (mcBall.x+mcBall.radius>right) {[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]mcBall.x=right-mcBall.radius;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]vx*=-1* bounce;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]} else if (mcBall.x - mcBall.radius < left) {[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]mcBall.x=left+mcBall.radius;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]vx*=-1* bounce;[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]}[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]}[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]mcBall.addEventListener(Event.ENTER_FRAME, bounceBall);[/COLOR][/FONT]
[FONT=Courier New]------------------Code-------------------[/FONT]