all groups > flash actionscript > march 2006 >
You're in the

flash actionscript

group:

Actionscript help



Actionscript help gwu630
3/12/2006 11:46:11 PM
flash actionscript: I got this tutorial from an online site, I went through it and it worked out
fine. But when I tried to implement it into my actual file, it doesn't work and
gave me an error msg, "**Error** Scene=Scene 1, layer=actions, frame=25:Line 4:
There is no property with the name 'pi'.
degrees = angleA/(Math.pi/180);"

Can someone help me with this? It's saying pi is not recognizable in my file,
but it worked from the original tutorial file.

Here is the original actionscript:

a = teapot._y-_ymouse;
b = teapot._x-_xmouse;
angleA = Math.atan2(a, b);
degrees = angleA/(Math.pi/270);
setProperty ("teapot", _rotation, degrees);
Re: Actionscript help gwu630
3/13/2006 1:21:58 AM
Re: Actionscript help Jeckyl
3/13/2006 10:58:48 AM
If you are exporting to FP7 or later, you need to get upper/lower case
correct.

There is no 'pi' but there is a 'PI'
--
Jeckyl

AddThis Social Bookmark Button