# Help Needed

**URL:** <https://forum.kirupa.com/t/help-needed/317177>\
**Category:** Uncategorized\
**Created:** [December 13, 2010, 7:38am UTC](https://forum.kirupa.com/t/help-needed/317177 "2010-12-13T07:38:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zigcramp](https://avatars.discourse-cdn.com/v4/letter/z/82dd89/32.png) [@zigcramp](https://forum.kirupa.com/u/zigcramp)\
**Post date:** [December 13, 2010, 7:38am UTC](https://forum.kirupa.com/t/help-needed/317177/1 "2010-12-13T07:38:30Z")

</div>

My movie for some reason is not working out. All it does is flash on and off and nothing works. It is a first person shooter. Following is my code:

// gunfire sounds  
var gunfire = new Sound();  
gunfire.attachSound(“gunfire”);  
\_root.hit1.onPress = function() {  
gunfire.svar i;  
tart();  
i++;  
// make bullet holes  
\_root.bull.duplicateMovieClip(“bulletNew”, i);  
if (i == 10) {  
i = 0;  
}  
// hit test on target  
if (\_root.target\_mc.hitTest(\_root.\_xmouse, \_root.\_ymouse, false)) {  
// play explosion  
\_root.gun.gotoAndPlay(2);  
// send target off stage  
\_root.target\_mc.\_x = 0;  
\_root.target\_mc.\_y = random(400);  
}  
};  
// initialise stuff  
\_root.onLoad = function() {  
// hide the mouse  
Mouse.hide();  
};  
//loop  
\_root.onEnterFrame = function() {  
//put cross hairs to mouse coords  
\_root.gun.\_x = \_root.\_xmouse;  
\_root.gun.\_y = \_root.\_ymouse;  
// target move  
\_root.target\_mc.\_x += 10;  
// if it goes offstage, send it stage left  
if (\_root.target\_mc.\_x\<0 || \_root.target\_mc.\_x\>Stage.width) {  
\_root.target\_mc.\_x = 0;  
\_root.target\_mc.\_y = random(400);  
}  
};  
my\_btn.onRollOver = function() {  
Mouse.show();  
}  
// hide mouse  
my\_btn.onRollOut = function() {  
Mouse.hide();  
}  
on (rollOutgotoAndPlay(scene 2();  
);  
) {  
}

on the movie clips for the gun sight and my\_btn I have a stop action on frame 1 on the movie clip timeline.  
Any help is appreciated.  
Thank you
