# Need help with a game(how to pick coins up)

**URL:** <https://forum.kirupa.com/t/need-help-with-a-game-how-to-pick-coins-up/256812>\
**Category:** Uncategorized\
**Created:** [April 7, 2008, 4:34pm UTC](https://forum.kirupa.com/t/need-help-with-a-game-how-to-pick-coins-up/256812 "2008-04-07T16:34:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boburmum1](https://avatars.discourse-cdn.com/v4/letter/b/edb3f5/32.png) [@boburmum1](https://forum.kirupa.com/u/boburmum1)\
**Post date:** [April 7, 2008, 4:34pm UTC](https://forum.kirupa.com/t/need-help-with-a-game-how-to-pick-coins-up/256812/1 "2008-04-07T16:34:02Z")

</div>

i need help with getting the char to pick up coins. here is my flash AS code for the coins.

onClipEvent(enterFrame){  
if(\_root.move\_mc.hitTest(this)){  
\_root.money++;  
this.\_x=-50;  
this.\_y=-50;  
}  
}

and for the money layer it is

money=0;

and this is the AS for the char

onClipEvent(load){  
speed=7;  
}  
onClipEvent(enterFrame){  
if(Key.isDown(Key.RIGHT)){  
\_x+speed;  
}  
if(Key.isDown(Key.LEFT)){  
\_x-speed;  
}  
if(Key.isDown(Key.DOWN)){  
\_y+speed;  
}  
if(Key.isDown(Key.UP)){  
\_y-speed;  
}

i am using AS 2.0 and would greatly appreciate anyone that helps me. please correct also any AS that is wrong
