Okay, i'm making a line rider styled game...which is why i did the skate board thingy post... i want my guy to look different while he's falling. He has 2 frame; one for standing and one for falling, my problem is, after falling he doesn't stop with that frame, herer is his, code, i hope some one can help! (terrain [found in code] is the track, just create something instanced as that so it can be tested...)
onClipEvent (load) {
gravity = 0.2;
yspeed = 4;
xspeed = 5;
falling = true;
}
onClipEvent (enterFrame) {
if (_root.go) {
if (Key.isDown(Key.LEFT)) {
if (!_root.terrain.hitTest(_x-_width/2, _y+_height/4, true)) {
_x -= xspeed;
}
}
if (Key.isDown(Key.RIGHT)) {
if (!_root.terrain.hitTest(_x+_width/2, _y+_height/4, true)) {
_x += xspeed;
}
}
yspeed += gravity;
while (_root.terrain.hitTest(_x, _y+_height/2, true)) {
_y--;
yspeed = 0;
}
if (!_root.terrain.hitTest(_x, _y+_height/2+1, true)) {
_y += yspeed;
} else {
yspeed = 0;
}
if (falling = true){
this.gotoAndPlay(2)
}
if (falling = false){
this.gotoAndPlay(1)
}
}
}

