A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: rotating a movie clip

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Posts
    3

    rotating a movie clip

    Can anyone help me regarding rotating a movie clip using Actionscript. I know how to write the code to rotate an hour hand and a min hand on a clock, but they are rotating from their literal centrepoints (default centres). I have moved the centre of the hands and when I manually rotate them, they are rotating about the new correct points, however, when actionscript tells them to rotate, they rotate about the original default centres. This is not what I want.
    Brian.

  2. #2
    between 92762 and 92764...
    Join Date
    Jun 2001
    Location
    > 92762 && < 92764
    Posts
    98
    This may sound like a obveous or stupid answer, but did you ever think about just moving what's inside of your movie clip off to the side so the true center would be on its edge? Or if you didnt want to move the contents of the origanal movie clip, you could always just put what you want to rotate inside of another movie clip and position it so the center is off to the side, and then use action script to rotate it like normal.

    instead of:
    _root.clockhand._rotation +=1
    use:
    _root.rotatecontainer._rotation += 1

    and put the clock hand into the rotate container

    Hope this could help at all,
    Chris
    Just Remember...
    You are unique, just like everyone else...

  3. #3
    Junior Member
    Join Date
    Oct 2003
    Posts
    3

    rotating a movie clip

    thanks very much to those who made suggestions. Sadly, I still cannot achieve what I am trying to do. I moved the centrepoint of the hand to its base and it still rotates about its default centre when rotated by actionscript commands. Totally ridiculous really. What I was intending to do was make a clock that would show the time entered by children when entered digitally (numerically) to teach them how to read the time.
    I guess I will just have to keep on experimenting.

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