A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: [?]change rotation point with code

  1. #1
    Senior Member zervell's Avatar
    Join Date
    May 2004
    Posts
    259

    [?]change rotation point with code

    how do I change the rotation point of a movie clip with code. I know there is a trigonometric way to assign the rotation point to a x and y point.
    CEO OF

  2. #2
    Senior Member UnknownGuy's Avatar
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    1,361
    You make what you want to rotate another movieclip. If you want to move the rotation point to x=20, y=20 , set the inner mc coordinates to that. Then rotate the parent clip and move the parent clip to x=-20,y=-20. Hopefully this should work.

  3. #3
    Senior Member zervell's Avatar
    Join Date
    May 2004
    Posts
    259
    thanks but I can't do it that way. I am rotating the stage. I am working on a Vcam that has the ability to rotate. Those who don't know what a Vcam is, its a movie clip that makes zooming in on animation and games easy.

    Vcam
    CEO OF

  4. #4
    ********* mentuat's Avatar
    Join Date
    Mar 2002
    Location
    out of office
    Posts
    717

  5. #5
    Senior Member zervell's Avatar
    Join Date
    May 2004
    Posts
    259
    you just posted a link back to this thread? lol

    the never ending circle..........
    CEO OF

  6. #6
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    using Trigonometry? works at least for me

  7. #7
    Senior Member zervell's Avatar
    Join Date
    May 2004
    Posts
    259
    how did you get it to work?
    CEO OF

  8. #8
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    no there is no such thing as a rotation point (pivot) that can be changed in AS1/AS2 but you can shift Values kinda offsetting the object in a way so that it rotates arount a theoretical point.

    see atachment of a trig. collection I wrote for myself the 3rd or 4th example is about rotating aroung a given point
    you need to rename the attachment extension back to mht (microsoft html archive) and open it either with InternetExplorer or Opera.
    Attached Files Attached Files

  9. #9
    ********* mentuat's Avatar
    Join Date
    Mar 2002
    Location
    out of office
    Posts
    717
    you just posted a link back to this thread? lol

    the never ending circle..........
    ah yes, oops sorry about that, it was meant to be a link to some Math.atan2 examples but I must have copied and pasted from the wrong window. Not sure it would have helped any way now I understand your problem.

  10. #10
    Pencil Farmer cadin's Avatar
    Join Date
    Jul 2006
    Location
    Vancouver BC
    Posts
    323
    I don't understand exactly what you are trying to do, but this might help:
    Dynamic MovieClip Registration with AS2

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