So anyways in school we use flash 5 or 6 (can't remember which) and I can make really simple games there but when I sent one home it only works if I change publish settings to work in flashplayer 6... this is the code that no longer works if I set the publish settings to flashplayer 9:
onClipEvent (enterFrame)
{
if (Key.isDown(39))
{
torque = 5;
}
else if (Key.isDown(37))
{
torque = -5;
}
else
{
torque = 0;
}
}
onClipEvent (load)
{
angle = 0;
xv = 0;
x = 0;
y = 0;
yv = 0;
xa = 0;
ya = 0;
v = 0;
visc = 2.000000E-002;
drag = 0;
}
onClipEvent (enterFrame)
{
rtorque = 5.000000E-001 * AngVelocity;
AngAcceleration = torque - rtorque;
AngVelocity = AngVelocity + AngAcceleration;
angle = angle + AngVelocity;
if (angle < 0)
{
angle = angle + 360;
}
if (angle > 360)
{
angle = angle - 360;
}
v = Math.sqrt(xv * xv + yv * yv);
drag = visc * v;
if (Key.isDown(38))
{
force = 1;
gotoAndStop(6);
}
else
{
force = 0;
gotoAndStop(5);
}
xa = drag * xv * -1 + force * Math.sin(1.745300E-002 * angle);
ya = drag * yv * -1 - force * Math.cos(1.745300E-002 * angle);
xv = xv + xa;
yv = yv + ya;
setProperty("", _y, _y + yv);
setProperty("", _x, _x + xv);
setProperty("", _rotation, angle);
}
I want it to work but I don't even know what is wrong, let alone how to fix it... this is where I was hoping you super amazingly great newgrounds peoples could possibly help me? :) of course i am hoping someone will just make it work for me, but being newgrounds I don't expect that to happen so telling me what is wrong and pointing me in the right direction to fixing it would be nice :)
oh yeah btw the code USUALLY makes for decent-ish car movement with the arrows if anyone was wondering O=)