# Help Needed with a game I am making--Its about hitTest/duplicateMovieClip

**URL:** <https://forum.kirupa.com/t/help-needed-with-a-game-i-am-making-its-about-hittest-duplicatemovieclip/210683>\
**Category:** flash\
**Created:** [December 21, 2006, 12:50am UTC](https://forum.kirupa.com/t/help-needed-with-a-game-i-am-making-its-about-hittest-duplicatemovieclip/210683 "2006-12-21T00:50:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Esoltas](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@Esoltas](https://forum.kirupa.com/u/Esoltas)\
**Post date:** [December 21, 2006, 12:50am UTC](https://forum.kirupa.com/t/help-needed-with-a-game-i-am-making-its-about-hittest-duplicatemovieclip/210683/1 "2006-12-21T00:50:25Z")

</div>

Hello…:tired:

I’m making a game with lots and lots of the same movie clips and I don’t want to give thousands of items the same actionscript. So logically I thought I should use actions on frames (makes sense…to me at least) but when I used that, nothing happened. can anyone explain what went wrong/how to fix it? I only need a little help. Heres the description:

I have a guy that when he hits a coin, the coin needs to disappear (I will use removeMovieClip later, but for now I want this) and change the dynamic text box to +1. The var name for the text box is “\_root.money”. The instance name of the coin(s) is “coin\_mc”. I put this code on the frame:

money = 00;

if (\_root.guy.hitTest (\_root.coin\_mc)) {

\_root.money++;  
\_root.coin\_mc.\_x = -50;  
\_root.coin\_mc.\_y = -50;

}

I know changing the x & y is “cheating”, but this is temporary. thank you for helping if you reply. Posting your name/answer to my problem will earn you a place in the credits of the game!!! (if it works):hugegrin:

PS-- I am currently toying with the code to get it to work.
