   Actionscript Game
  Hi guys, i have a problem, i want to know what is the easest way to make real gravity so my character can be able to jump.  I am making a game that is a guy (mario) who have to clean windows in the fastest time possible. I was thinking on making plataforms that goes up and down, but first i want to know how can i do the jumping guy, so far i have:_root.attachMovie("mario", "mario", 100);mario.onEnterFrame = function() {if (Key.isDown(Key.RIGHT))this._x += 5;else if (Key.isDown(Key.LEFT))this._x -= 5;if (Key.isDown(Key.UP))this._y -= 5;else if (Key.isDown(Key.DOWN))this._y += 5;}for (i=0; i<14; ++i) {windows = "v" + i;_root.createEmptyMovieClip(windows,i);_root[windows].onEnterFrame = function() {if(this.hitTest(mario) && (Key.isDown(Key.SPACE))) {this.gotoAndPlay(2);}}}thanks guys!   
  Give each object two movement deltas, deltaX and deltaY. On every frame, update your coordinates based on the deltas.For "real" gravity, your deltaY must increase slightly every step, as things fall faster the longer they fall. Just try some values and futz around with 'em until your object looks like it's falling realistically.That's how the objects fall in Olive Wars works. It's pretty far from a physics engine, but it looks right.   ;  Oh thanks man, I will check it out, thank you   ;  great   ;  Hmmmm... I dunno if this is correct...I'm thinking that you should have a global variable (static if you prefer but I don't know how it's used in actionscript) that defines gravitygravity = 9.8; //whatever you want to put in...then mario should have something like...mario.onLoad = function(){    var mass = 10 // choose whatever you like...    var x;    var y;}then...mario.onEnterFrame = function(){    this.y = this._y;    this.x = this._x;    this.y - = (mass * gravity); }this would make mario fall "all the time". But what if he's stepping on a floor?I'm thinking maybe there should be something like this...//Put this in every instance of the floor ClassonClipEvent(load){    var normal = 1;}onClipEvent(enterFrame){    if (this.hitTest(_root.mario.x, _root.mario.y))    {   while (this.hitTest(_root.mario.x, _root.mario.y))   {  _root.mario.y --; //go up   }    }    }Err.... I'm really trying to be helpful here... Tell me if I've made things worse...   