# Hide and unhide my gun mouse

**URL:** <https://forum.kirupa.com/t/hide-and-unhide-my-gun-mouse/316928>\
**Category:** flash\
**Created:** [December 6, 2010, 11:13am UTC](https://forum.kirupa.com/t/hide-and-unhide-my-gun-mouse/316928 "2010-12-06T11:13:50Z")\
**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 6, 2010, 11:13am UTC](https://forum.kirupa.com/t/hide-and-unhide-my-gun-mouse/316928/1 "2010-12-06T11:13:50Z")

</div>

Hello all. I am making a first person shooting game for my school project for my final. All is working well at this time, but I want to add another scene and I am not sure how to do this. Im using Flash MX. The code I have so far is:

var i;  
// gunfire sounds  
var gunfire = new Sound();  
gunfire.attachSound(“gunfire”);  
\_root.hit1.onPress = function() {  
gunfire.start();  
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);  
}  
};

I am looking at a button to add to send my movie to scene 2. What would the code be to show my mouse over the button I wish to use and where in the code line would I insert it?  
Thank you all in advance
