# Flash Player 6 code not working in Flash Player 10

**URL:** <https://forum.kirupa.com/t/flash-player-6-code-not-working-in-flash-player-10/284156>\
**Category:** flash\
**Created:** [March 16, 2009, 5:06am UTC](https://forum.kirupa.com/t/flash-player-6-code-not-working-in-flash-player-10/284156 "2009-03-16T05:06:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![denn](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@denn](https://forum.kirupa.com/u/denn)\
**Post date:** [March 16, 2009, 5:06am UTC](https://forum.kirupa.com/t/flash-player-6-code-not-working-in-flash-player-10/284156/1 "2009-03-16T05:06:44Z")

</div>

I would like to know how the following ActionScript, that only works in Flash Player 6, can be updated to work in a Flash Player 10 file.

The code comes from a tutorial at [http://www.tutorial4me.com/rotating\_menu.php](http://www.tutorial4me.com/rotating_menu.php)

As it says, “On Publish Settings set Flash Player version on Flash Player 6, or this movie will not work.”

It works fine published as FP6 but not as FP10 as I need it to be. Thanks

This AS is added to a movie symbol that contains a button for a rotating menu effect.

onClipEvent (load) {  
hx = 300/2;  
hy = 400/2;  
r = 100;  
a = 30;  
function speed(num) {  
speedX = -(\_root.\_xmouse-hx)/num;  
return speedX;  
}  
function trans() {  
p += speed(40);  
range = ((p+72)\*Math.PI)/180;  
re1 = ((Math.sin(range))\*r);  
re2 = ((Math.cos(range))\*a);  
}  
function property() {  
trans();  
\_x = hx+re1;  
\_xscale = \_yscale=\_alpha=re2+70;  
this.swapDepths(\_alpha);  
}  
}  
onClipEvent (enterFrame) {  
property();  
}
