# Character falls of moving platform

**URL:** <https://forum.kirupa.com/t/character-falls-of-moving-platform/50417>\
**Category:** flash\
**Created:** [May 2, 2004, 10:05pm UTC](https://forum.kirupa.com/t/character-falls-of-moving-platform/50417 "2004-05-02T22:05:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fargate](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@Fargate](https://forum.kirupa.com/u/Fargate)\
**Post date:** [May 2, 2004, 10:05pm UTC](https://forum.kirupa.com/t/character-falls-of-moving-platform/50417/1 "2004-05-02T22:05:05Z")

</div>

[AS]onClipEvent (enterFrame) {  
if (Key.isDown(Key.RIGHT)) {  
this.\_x += 5;  
} else if (Key.isDown(Key.LEFT)) {  
this.\_x -= 5;  
}  
}  
onClipEvent (enterFrame) {  
if (Key.isDown(Key.UP) && !jumping) {  
vel\_y = 36;  
jumping = true;  
}  
if (jumping == true) {  
vel\_y -= 2;  
if (vel\_y\<=-15) {  
vel\_y = -15;  
}  
this.\_y -= vel\_y;  
}  
if (\_root.ground.hitTest(this.\_x, this.\_y+35, true)) {  
vel\_y = 0;  
jumping = false;  
}  
}  
onClipEvent (enterFrame) {  
this.\_y += 16;  
if (\_root.ground.hitTest(this.\_x, this.\_y+1, true)) {  
this.\_y -= 16;  
}  
}  
[/AS]

That’s the script I have on my character. Inside my mc called ground I have another mc which has an mc containing a moving platform. My character hittest okay with it, but once I jump onto it the platform continues to move and my character just falls off. What would I need to do so that the character stays on? Anyways any help would be greatly appreciated :).

EDIT: Why can’t you upload fla’s anymore? Since when did this happen :h:?
