dimanche 24 mai 2015

How to hide mouse over multiple frames?

I'm an actionscript n00b, please excuse my ignorance. currently trying to make my first person shooter game and have picked up great tips from Lynda(.com) but im having difficulty changing my mouse into a crosshair cursor and having that crosshair not show up permanently in subsequent frames as I create this game.

so i have this code on an action layer but on other layers when I create another key frame to change what I shoot at on other layers, my cursor stamps a permanent image of itself onto the screen. I definitely need to understand this language more if Im going to become good at it but for now i'f like to be able to make a few games to entertain myself, any suggestions? are appreciated

var cursor:MovieClip;

function initializeGame():void
cursor = new Cursor();
cursor.enabled = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, dragCursor);

function dragCursor(event:MouseEvent):void
cursor.x = this.mouseX;
cursor.y = this.mouseY;


Aucun commentaire:

Enregistrer un commentaire