2 Replies Latest reply on Jan 9, 2008 8:39 PM by chad1416

    trigish help

      hey i have a mc called wheel_mc
      and i have this on the frame to make the mc spin when the mouse moves

      this.onEnterFrame = function () { var _loc = this.wheel_mc; dx = _xmouse - _loc1._x; dy = _ymouse - _loc1._y; nextRotation = Math.atan2(dy, dx) * 180 / 3.141593; _loc._rotation = nextRotation; }; stop();

      and this on the wheel_mc

      onClipEvent (enterFrame) { if (Key.isDown(1)) { gotoAndStop (2); } }

      and on the second frame of that mc i have a mc of a bullet going away from the wheel turn gun

      everything works but when i shoot, and move the mouse at the same time, its like moving the bullet to.
      so is there a way i can it where when you shoot, it wont spin? like say, void the spin code, until the last frame of the shoot mc.
      i know i could make 2 functions, on/off i dont know what thee functions would say but, something like

      on = function () {
      a code that says void the spin code

      off = function () {
      a code that says unvoid (if thats a word) the spin code

      then i could just put on; on the first frame of the wheel_mc shooting frame and off; on the last frame
      im really stumped on this...