# \[FMX\] sidescroller animation problem :s

**URL:** <https://forum.kirupa.com/t/fmx-sidescroller-animation-problem-s/135443>\
**Category:** Uncategorized\
**Created:** [January 27, 2005, 12:02pm UTC](https://forum.kirupa.com/t/fmx-sidescroller-animation-problem-s/135443 "2005-01-27T12:02:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kormyen](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kormyen](https://forum.kirupa.com/u/kormyen)\
**Post date:** [January 27, 2005, 12:02pm UTC](https://forum.kirupa.com/t/fmx-sidescroller-animation-problem-s/135443/1 "2005-01-27T12:02:09Z")

</div>

hello, would anyone be able to help me with this? thanks

for some reason, the animation stays on ‘falling’ when ever it should be any where other than “jumping - in air” animation (which is the only other one that works)

just download the ‘.swf’ to see what i mean  
[http://i.domaindlx.com/kormyen/kpe2.swf](http://i.domaindlx.com/kormyen/kpe2.swf)  
left right space an control  
heres the .fla  
[http://i.domaindlx.com/kormyen/kpe2.fla](http://i.domaindlx.com/kormyen/kpe2.fla)

and the part of the code i think is screwy:

onClipEvent(enterFrame){  
if (falling==1){  
this.\_y-=fall;  
if (fall\>maxfall) {  
fall–;  
}  
}  
}  
onClipEvent(enterFrame){  
if (falling==0){  
fall=0;  
}  
}  
//problem somewhere after here  
onClipEvent (enterFrame) {  
if (key.isdown(key.SPACE)) {  
if (jumping == 0){  
if (falling == 0){  
this.gotoAndStop(4)  
jumpheight=(jumpheight + 2);  
if (jumpheight\>=maxjump){  
jumpheight=maxjump;  
}  
}  
}  
}  
}  
onClipEvent (keyUp) {  
if (Key.getCode() == Key.SPACE){  
if (jumping==0){  
if (falling==0){  
jumping=1;  
jump=jumpheight;  
jumpheight=0;  
}  
}  
}  
}  
onClipEvent (enterFrame){  
if (jumping==1){  
if (falling==0){  
this.gotoAndStop(5);  
this.\_y -= jump;  
if (jump\>minjump) {  
jump–;  
}  
}  
}  
}  
onClipEvent (enterFrame){  
if (jump==minjump){  
jumping=0;  
falling=1;  
jump=0;  
}  
}  
onClipEvent (enterFrame){  
if (falling==1){  
if (jumping==0){  
this.gotoAndStop(7);  
this.\_y -= fall;  
if (fall\>maxfall) {  
fall-fallspeed;  
}  
}  
}  
if (falling == 0){  
fall = 0;  
}  
}

//problem somewhere before here

once again, thank you  
`kormyen
