A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Rotating an object downwards

  1. #1
    Junior Member
    Join Date
    Jul 2009

    Rotating an object downwards

    Hello there,

    I'm struggling on finding out how to make an object always face downwards.

    I have multiple movieclips inside a rotating movieclip and I need the multiple movie clips to always face downwards.

    I cannot work out how to do it with my noobie skills, and google is not helping me. I will be very grateful for any help.

    I've tried messing around with this code for a rotating eye, even though it's meant to rotate to the mouse, but have had no hope.

    _root.onEnterFrame= function(){
    a = eye._y-_ymouse;
    b = eye._x-_xmouse;
    angleA = Math.atan2(a, b);
    degrees = angleA*(180/Math.PI);
    setProperty ("eye", _rotation, degrees);
    Thanks in advanced.
    Last edited by sebby123; 07-23-2009 at 08:26 AM.

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