Ok first of all, don't flame for not using 5 hours rummaging topic which could hold the answer.
on to topic
i have a VERY simple flash game i trying to add gravity to.
"
onClipEvent (enterFrame)
{
var speed:Number = 3;
var gravity1:Number = 0;
var gravity2:Number = 2;
}
onClipEvent (enterFrame) // Center Pos (266.7 ,190.9)
{
gravity1 = gravity1 + gravity2;
this._y = this._y + gravity1;
if (Key.isDown(38))
{
this._y = this._y - speed;
}
if (Key.isDown(40))
{
this._y = this._y + speed;
}
if (Key.isDown(37))
{
this._x = this._x - speed;
}
if (Key.isDown(39))
{
this._x = this._x + speed;
}
}
"
this code is in in a movie clip object
the problem with it is that it doesent change the variables.
like: "gravity1 = gravity1 + gravity2;" would add 2 for each frame 2 ,4 ,6 ,8....
but it does not, it stays at 2.
some1 enlighten me?
(Sorry if i posted in the wrong section)