Hi everyone. I am making my first game and it's my first time using actionscript. I am making a sniper game themed with the L96A1 sniper rifle from COD: Black Ops and the map nuketown. I'm in cs5 with ac3 and on my stage I have two movie clips that I'm working with. I'm not really sure if they're supposed to be movie clips though. Anyways, one is the gun, and the other is the zoomed in scope overlay thingy.

For now, I'm trying get the zooming in to work. I haven't done anything else though except collect graphics for enemies, the landscape, the gun, and the scope. I want to make it so that you zoom in and out by holding and letting go of the space bar. Also, I want to make it so that when you are not zoomed in, the gun moves horizontally at the bottom of the screen (aligned vertically with the cursor). And when you are zoomed in, the scope crosshair is the cursor.

So my idea was to set the gun as the cursor and make it only move horizontally at the bottom of the stage and then make an event listener that listens to when the spacebar is pressed and when it is, disables the gun as the cursor (and makes it transparent to get it off the screen) and makes the scope the cursor [was transparent, now opaque and unrestricted(vertical movement also)].

I got as far as making the gun move horizontally at the bottom with the cursor. I cant get the event listener working because I don't really know how to go about changing the opacity of each movie clip and how to switch cursors. So I am asking how do I change the opacity and switch the cursors when the spacebar is held and then reverse those changes when the spacebar is released?

Here's my code on an "actions" layer [I haven't done any animations yet, so everything is on frame 1. Also, I used a couple preset code snippets since I have no previous experience with actionscript (I can understand most of it though)]:
Code:
import flash.events.KeyboardEvent;

// make gun cursor
stage.addChild(gun);
gun.mouseEnabled = false;
gun.addEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor_2);

function fl_CustomMouseCursor_2(event:Event)
{
	gun.x = stage.mou***;
//	gun.y = stage.mouseY;
}
Mouse.hide();

// To restore the default mouse pointer, uncomment the following lines:
// gun.removeEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor_2);
// stage.removeChild(gun);
// Mouse.show();
// end make gun cursor

// zoom
stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler);

function fl_KeyboardDownHandler(event:KeyboardEvent):void
{
	if (event.keyCode == 32) {
		
	}
}
// end zoom
Here's a link to a zip archive with all the files used so far (I hope this google docs link works): link

Sorry if that was longer than it needed to be. If you have any suggestions or a solution to my problem, please leave a clear reply. Any help is appreciated.