# Hey my new game idea's actionscript doesnt work

**URL:** https://forum.kirupa.com/t/hey-my-new-game-ideas-actionscript-doesnt-work/184660
**Category:** flash
**Created:** [April 6, 2006, 5:08pm UTC](https://forum.kirupa.com/t/hey-my-new-game-ideas-actionscript-doesnt-work/184660 "2006-04-06T17:08:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![wats120](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@wats120](https://forum.kirupa.com/u/wats120)
#### Post date: [April 6, 2006, 5:08pm UTC](https://forum.kirupa.com/t/hey-my-new-game-ideas-actionscript-doesnt-work/184660/1 "2006-04-06T17:08:47Z")

</div>

i have the code  
onClipEvent (load) {  
count = 0;  
}  
onClipEvent (enterFrame) {  
if (Key.isDown(1)) {  
this.attachMovie(“spark”, “hit”+hitNum, 1);  
hitNum++;  
}  
if (Key.isDown(2)) {  
this.attachMovie(“spark”+hitnum, “hit2”, 1);  
hitNum++;  
}  
if (hitNum\>3) {  
hitNum = 0;  
}  
}  
but it only lets me shoot one then restarts. how do you make it so you can shoot 3 before it restarts? its a harry potter platform shooter!  
check out the fla.
