# Jumping that jumps to the side ur sprite was facing

**URL:** <https://forum.kirupa.com/t/jumping-that-jumps-to-the-side-ur-sprite-was-facing/120760>\
**Category:** Uncategorized\
**Created:** [August 27, 2004, 4:50am UTC](https://forum.kirupa.com/t/jumping-that-jumps-to-the-side-ur-sprite-was-facing/120760 "2004-08-27T04:50:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KrustyJoe](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@KrustyJoe](https://forum.kirupa.com/u/KrustyJoe)\
**Post date:** [August 27, 2004, 4:50am UTC](https://forum.kirupa.com/t/jumping-that-jumps-to-the-side-ur-sprite-was-facing/120760/1 "2004-08-27T04:50:31Z")

</div>

hello i am semi- new to flash and i am creating a platform game and i am using this script on my main sprite for direction.

if (Key.isDown(Key.RIGHT)) {  
\_root.mainsprite.gotoAndstop(2);  
}  
if (Key.isDown(Key.LEFT)) {  
\_root.mainsprite.gotoAndstop(3);  
}  
if (Key.isDown(Key.UP)) {  
\_root.mainsprite.gotoAndstop(4);  
}  
}

in the MC “mainsprite” -FRAME 1 - sprite facing right still  
FRAME 2 - sprite walking right  
FRAME 3 - sprite walking left  
FRAME 4 - sprite jumping right

As u can see, when my man jumps the sprite faces the rightside even when my sprite is jumping to the left.

I would like something like this:

[http://www.gotoandplay.it/\_articles/2003/12/scrolling\_upd.php](http://www.gotoandplay.it/_articles/2003/12/scrolling_upd.php)

And i have downloaded the source file… i try not to let others do my work but i tryed extracting parts from it that would help me but nothing worked.

Thanks in advance

-Mike
