0 Replies Latest reply on Aug 28, 2008 8:20 AM by ledi51ofc

    _xmouse and _ymouse

    ledi51ofc
      Well I'm making a "CSI" game and for parts where you use the swabber I wanted it to replace the mouse with the swab icon (or fingerprint duster, etc.) So I wrote this code:

      quote:


      onClipEvent(load)
      {
      _root.swaben=0
      x1 = _x
      y1 = _y
      }
      on (press)
      {
      _root.swaben = 12
      _root.dusten = 0;
      _root.lighten = 0;
      }
      onClipEvent(mouseMove)
      {
      if (_root.swaben == 12)
      {

      Mouse.hide;
      this._x = _xmouse;
      this._y = _ymouse;
      }
      else
      {
      this._x = x1
      _y = y1
      }
      }


      So it sets its original coordinates to x1 and y1, when you click on it it sets swaben to 12 (don't ask me why) and sets lighten and dusten to 0 in case you had them selected, and SUPPOSEDLY hides the mouse and sets the coordinates. Not so.

      http://ledi51.t35.com/cistest.swf
      Here is the swf file. the mouse doesn't disappear and for some reason the icons go randomly around the screen. Any ideas?