3 Replies Latest reply on Apr 20, 2006 1:16 PM by D Herrick

    Actionscript works only in 5 or lower

    D Herrick Level 1
      So I'm using some code for eye rotation that follows mouse movement. This code only works when I output for Flash 5 or lower. Does anyone understand the math enough to help me with coding in Actionscript 2.0 for Flash 8?
      Thanks in advance.

      Dave

      I have a graphic and instance name for eye and eye2.

      // eye1 rotation
      a = eye._y-_ymouse;
      b = eye._x-_xmouse;
      angleA = Math.atan2(a, b);
      degrees = angleA/(Math.pi/180);
      setProperty ("eye", _rotation, degrees);

      // eye2 rotation
      a2 = eye2._y-_ymouse;
      b2 = eye2._x-_xmouse;
      angleA2 = Math.atan2(a2, b2);
      degrees2 = angleA2/(Math.pi/180);
      setProperty ("eye2", _rotation, degrees2);