A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Rotating eye effect

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Posts
    15

    Rotating eye effect

    hey im trying to make a game where theres a gun that aims at the cursor... i looked at a tutorial for "the rotating eye" which basically made the eye look at the cursor.

    it said to use this code:

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

    i changed it so it wasnt eye and it was gun to work for my game.. but when i try to play it it says:

    There is no property with the name 'pi'.
    degrees = angleA/(Math.pi/180);

    anyone know what to do???

  2. #2
    dream.in.code
    Join Date
    Nov 2000
    Posts
    95
    I would suggest posting this in one of the Flash forums here instead of the lounge... more likely to get a reply.

    The error most likely is related to an object not having the right name in your movie.

  3. #3
    Really this is me..... mentaleruptions's Avatar
    Join Date
    Apr 2002
    Location
    WV, USA
    Posts
    1,114
    Got a link to the tutorial in question ??

    My Flashkit Submited Movies:
    Guestbook: V.1.0 V.1.2 V.1.3 V.1.4 PHP Mail Form: V.1.0
    My Deviantart page: Link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center