Rotate a Object Around Center Axis

Hey peoples, new to flash here.  I'm using CS3 with ActionScript 3.0.  What I want is simple, and I've done some searching but nothing that can get me the right results.  I'm going to post a link that does exactly what I want:
http://www.newgrounds.com/dump/item/d25a3dd46f2ff49f2ec892c425cbbd1e
This rotates the circular object around a center point in a way that you can distort the object yet is still remains turning in a circular motion.  A simple motion tween rotating the image will only work if the object is perfectly round, so distorting the object to make it more straight or curved won't work with a simple tween.  I want to do exactly what is happening here (with my own object), is there some AS3 behind the scenes here making this turn on a center point??  Thanks for the help

Yes, but I still don't know what you mean by the parent child relationship.  Lets say I use a simple rotate line like:
objectname.rotation = 360;
That should spin it, but how do I spin it correctly if the object is skewed like in the bottom right picture of my example?

Similar Messages

  • Javascript function to rotate an object around its axis

    Hello,
    I wonder if it is possible to rotate an object around its axis (eg 45 ° rotation)?
    I want to make this rotation with a button and a Javascript code!
    Is it possible? if so, have a track for me to start?
    thank you

    Possible, yes - but you will need some basic knowledge of how 3D matrix transformations work if you want to do anything complex.
    The code to rotate a node in a 3D scene by 45 degrees on the X axis is
    myNode.transform.rotateAboutXInPlace(Math.PI/4)

  • Default rotate to object group center not artboard center

    I'm sure this is mind-numbingly obvious and I am overlooking it, but when I go to use the rotate tool, the center point of the rotation is defaulting to the center of the artboard, not the selected group of objects. How do I change that to default to rotating on the selection center by default?
    Thanks in advance!
    Richard
    PS. This is Illustrator CC (17.0.2) on a Mac running 10.9, if that is relevant.

    rcbmoose,
    As I (mis)understand it (differently from tman), it sounds like a corruption or something (hopefully not a bug, which should have been detected earlier, I believe).
    Unless solved otherwise, you may try the following (you may have tried/done some of them already) and see whether it helps (the following is a general list of things you may try when the issue is not in a specific file; 3) and 4) are specifically aimed at possibly corrupt preferences):
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder Other options (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • Record simple rotate of object on Z axis Options

    Hi,
    Using CS4. Is it possible to automatically record an object
    turning
    360 on the Z axis? At the moment, I am turning the object a
    couple of
    degrees (using 3d Rotation tool), pressing Insert Keyframe,
    then
    turning the object a little bit more, then Insert Keyframe
    again, etc.
    But it's just a simple 360 rotation - it must be possible to
    do this
    automatically?
    Thanks.

    Well, I'm getting closer but I'm not there yet.
    I found out how to use this expression which seems to do what I want but only for a single object sway.  If I could randomize this and put it on all of the items it would be pretty close.  Here's the expression:
    Math.sin(time*2)*1;
    This has two problems.  First it appears to start  swaying at the begining of the comp instead of the comp starting with the object already swaying.  I might be wrong on this.
    The other problem I already mentioned.  I don't know how to randomize this so each additional object has a random sway.  I at least found out how to attach the stay to a slider:
    Math.sin(time*2)*thisComp.layer("new slider control").effect("SwayAmmount")("Slider");
    I am able to set the slider at 1 and then to stop it I set it to 0.  I don't think this has a real ease or inertia, but it's ok I guess.
    But again, no random options.  I've searched high and low to understand the random function.  I found: "random()" but I need it to freeze at a random number.  I found "seedRandom(x,true)" but all directions I can find for that talk only about possition in the comp.  I've given up trying to translate this from position.
    Here's the closest I've come, but honestly I'm not even sure that it's a real function...
    seedRandom(3,true);
    RanNum = random(-2,4)
    Math.sin(time*(RanNum))*thisComp.layer("new slider control").effect("SwayAmmount")("Slider");
    This again links to the slider.  It DOES randomize somewhat and is better than nothing.  But surely there is a "correct" way which I am completely overlooking.  Using this method all layers sway left to right (fairly similarlily).  I would love to have some begin right to left, random...
    Any thoughts?
    Thanks!
    -Stephen

  • How to rotate 3D objects around the edge of another 3D object

    Hi everyone:
    I am trying to create an image of a human finger with 3D picture control, but in a simpler way. I intended to use three square boxes which are created by using Create Box VI.. Then I use Translate Invoke Node to line them up one after another. Then, I use Rotation Invoke Node to manipulate the rotation of the second and the third box. But, here are the problems.
    The first problem: How can I rotate the second box(Green box) around the edge of the first box(Red box), so that when the green box rotates, it doesn't overlap with the red box. I want it to be the same with the blue box, so that the blue box rotates around the edge of the green box. 
    The second problem: At the moment, the third box(Blue box) is rotating around the origin of the first box(Red box), how can I change it so that the blue box rotates around the edge of the second box(Green box). 
    I have attached the VI to this post. Please could anyone help me.
    Thanks very much
    Tommy Yip
    Attachments:
    Original design.vi ‏26 KB

    Hi Tommy,
    To get rid of the overlapping boxes one thing you could alter the position of the green box as the angle is increased, the green box could move right on its X axis and rotate on the XY plane so it bevels round the red box in accordance with the angle you give. This would require some playing around however to get the values just right.
    Have you had any success or updates since your first post?
    Regards,
    Ben B.
    Applications Engineer
    National Instruments UK & Ireland
    "I've looked into the reset button, the science is impossible!"

  • How to limit rotation around an axis

    Hello!
    I am using Mouse Rotate to rotate an object around it's axis:
    MouseRotate mouseRotate = new MouseRotate();
    mouseRotate.setTransformGroup( sectionTransform );
    mouseRotate.setSchedulingBounds( new BoundingSphere() );
    mouseRotate.setFactor( 0, 0.3 );
    Currently it rotates 360 degrees, but I would like to be able to limit the rotation angle to say 180. Could you please help me out?
    Thanks!
    Anna.

    You might want to consider creating your own behaviour. It depends on your implementation, but if you have a Transform group above the object, you can get the transform and get the rotation values from that transform. It will take a bit of math, but here's a primer to get you started...
    http://www.martinb.com/maths/geometry/rotations/conversions/index.htm
    http://www.martinb.com/maths/geometry/rotations/conversions/matrixToEuler/index.htm
    so if you calculate the angle around a particular axis from that transform and it is "greater" than the limit, then you can just set the transform's rotation angle to the limit by reconstructing a new transform and placing that transform in the transform group.
    Anyway, I dont know if that helps. It really depends on what you have as far as implementation thus far. My best suggestion is to try to create your own rotation behaviour.
    Cheers,
    Greg

  • Distributing objects around circle

    I am working on Mac OS 10.4.11 and Adobe CS3 ME.
    I know it's possible to evenly distribute objects in a line. But I would like to evenly distribute objects in a circle shape. Can that be done in Indesign or Illustrator?

    Yes, it can be done in either InDesign or Illustrator.
    I'm going to give you the steps in InDesign, but Illustrator is almost identical.
    First draw the shape that you want to distribute. Position it where you would want the top or 12 o'clock item.
    Now, switch to the Rotate tool. As you do, a rotation center point appears inside the bounding box of the original object.
    This center point needs to be moved to the center of the circle that you want to rotate the object around. (Or where the hands of the clock would originate from.)
    Hold the Option or Alt key and click where the roatation center point needs to be.
    A dialog box appears.
    Enter the angle of roation. This is usually an amount that is created by dividing 360. For instance, if you want 10 objects around the circle, you would enter the rotation amount of 36 degrees.
    If you wanted 12 objects, you would enter the rotation amount of 30 degrees. You figure out what you want.
    Use the Preview amount to see what it would look like. When you like what you have, click the Copy button (not the OK button).
    You will now have one new object in position. At this point you have "primed the pump" so to speak. InDesign now knows to make a copy at a certain rotation.
    Go to Object > Transform Again > Transform Again. The keyboard shortcut is Cmd-Opt-3 or Control-Alt-3.
    Each time you invoke the command, a new copy appears in position.
    This is the classic way to distribute objects in a circle.
    There are other ways to do it that would put the object around an actual circular object.
    But you might as well learn this one first.

  • Ability to move an object's Center Point

    I'd like to be able to move an object's Center Point, much like you can in Corel Draw and also with Anchor Points in After Effects.
    This would super handy when rotating multiple objects around a common point.
    I realize this would mess things up for things like Scaling, and really mess them up for Skewing.
    Maybe a "Rotation Point" could be added?
    You could have a Preference setting to enable/disable this.
    Maybe a new Tool to do just that, like AE's Pan Behind Tool.
    Or maybe, probably more sensible, a key modifier when using the White Arrow Tool.

    AS3 doesn't have a mechanism to determine or change
    registration point (at least to my knowledge).
    The way around it is to use DisplayObject.getBounds or
    DisplayObject.getRect methods that return rectangles. x and y
    properties of the rectangle will show if there is a shift relative
    to 0 from which one can deduce a registration point.
    Hope it helps.

  • Swinging/Rotating an object in AE 5.5

    Hi all,
    I have a question about something that I am trying to achieve in AE5,5.
    I have a clip that I would like to 'rotate' into the frame and was wondering how I could do this. If I might explain:
    If you can imagine the action of a clapperboard, you might have an idea of the effect I'm trying to attain.Essentially, I'd like the clip to start offscreen on the right hand side of the frame, At this point, the clip would be rotated 90 degree clockwise. Over the a next couple of seconds, I'd like it to 'crash' down into the frame, rotating around the lower, right corner so that it ends up filling the frame and the correct way up :-). I thought it would be fairly easy to do this with a few adjustments around the anchor points but I seem to be having no luck as whenever I move the anchor point, the entire clip seems to move rather than just adjusting the point at which I'd like it to rotate.
    What am I missing??
    Any help would be greatly appreciated.
    Many thanks,
    Sean

    :-) Ah, I've been rumbled!! To be honest, I come from a straight video editing background and am just starting to get to grips with AE. I have just cracked open the Classroom-In-A-Book this week and (naively) thought that it might be something I could achieve simply by changing the anchor point from which to rotate the object around.  Seems like I was slightly off track - maybe I should have perservered with the book before I tried!
    Many thanks for the replies - I will certainly have a look at the blog post you mentioned and will see how I get on. From what I've seen so far, AE looks like it's going to be keep me occupied for many, many months to come. I'm looking forward to it!
    thanks again,
    Sean

  • Need to rotate image around the axis

    Hi, I'm using this ti rotate the image, it works but I need to rotate the image around the center of the image, center axis.
    I don't understad what is the meaning of values 50 and 60, and what I need to write instead?
    public void paintComponent_new(Graphics g){
    super.paintComponent(g);
    Graphics2D g2 = (Graphics2D)g;
    g2.rotate (Math.toRadians(angle),60,60);
    g2.drawImage(pre.getImage(), 50, 50, this);
    g2.dispose();
    }

    Using that method, the rotation occurs around the point (x,y). The rotation is a measure of theta radians. One radian translates to 180/PI degrees; thus, there are 2*PI radians in 360 degrees.
    So if, for example, you wanted to rotate round the point (40,40) exactly 90 degrees, you could use
    Graphics2D g2d = ...;
    g2d.rotate(Math.PI/2, 40, 40);Note that this rotation is a translation of the view, not a translation of any contents. That means that anything drawn to the Graphics2D object will appear as if rotated in that fashion. Therefore, if you draw an image onto that Graphics2D object after calling rotate in that fashion, the image will be rotated as well.

  • Animate a cube to rotate around x axis!!!

    Hi! I'm trying to animate a cube to rotate around x axis using RotationInterpolator object.
    Can anyone kindly tell me how I can do that? I've seen the example at Sun's 3d tutorial but they use the default behavior which is rotating around y axis.
    Thanks in advance.
    --DM

    lol
    in fact the axis used in the RotationInterpolator is the one which is on the y axis in the local coordinates system obtained after the Transform3D is performed
    for example:
    - if you use only new Transform3D(), which does nothing, the axis will be y
    - but if you use rotz(), this transform3D transforms the old x axis into the new y one, the old y axis into the new -x one and the old z axis into the new z one. Thus in the new local coordinates system obtained, the new y axis matches the old x axis, so this x axis is used for the interpolator
    I don't know if I'm very clear, it's difficult to explain and I'm French ;)
    see the java 3D API :
    http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_3_API/j3dapi/javax/media/j3d/RotationInterpolator.html#RotationInterpolator(javax.media.j3d.Alpha, javax.media.j3d.TransformGroup, javax.media.j3d.Transform3D, float, float)

  • Rotating object around global axises.

    Hi there. I'm writing a simple Java3D application, intended for viewing a object loaded from OBJ file, allowing user to scale and rotating this object, by using keyboard, around all axises.
    My problem is, that every rotation is occurring around local axises, apparently relative to object, and my intention is, to rotate object relatively to world's coordinations or just camera's.
    My Behaviour class code goes here:
    (some variables names are in my native language)
    public static class ObjectManipulation extends Behavior{
        private TransformGroup targetTG;
        private Transform3D trans = new Transform3D();
        private Transform3D temp_trans = new Transform3D();
        private double skala = 0.4f;
        ObjectManipulation(TransformGroup targetTG) {
            this.targetTG = targetTG;
        public void initialize() {
            this.wakeupOn(new WakeupOnAWTEvent(KeyEvent.KEY_PRESSED));
        public void processStimulus(Enumeration criteria) {
        WakeupCriterion wakeup;
        AWTEvent[] event;
            while( criteria.hasMoreElements() ) {
              wakeup = (WakeupCriterion) criteria.nextElement();
              if(wakeup instanceof WakeupOnAWTEvent) {
                    event = ((WakeupOnAWTEvent)wakeup).getAWTEvent();
                        for( int i = 0; i < event.length; i++ ) {
                            if( event.getID() == KeyEvent.KEY_PRESSED )
    checkEvent((KeyEvent)event[i]);
    this.wakeupOn(new WakeupOnAWTEvent(KeyEvent.KEY_PRESSED));
    private void checkEvent(KeyEvent ke) {
    int klawisz = ke.getKeyCode();
    if(klawisz == KeyEvent.VK_S) {
    temp_trans.rotY(Math.PI/10.0f);
    trans.mul(temp_trans);
    targetTG.setTransform(trans);
    } else if (klawisz == KeyEvent.VK_A) {
    temp_trans.rotY(Math.PI/-10.0f);
    trans.mul(temp_trans);
    targetTG.setTransform(trans);
    } else if (klawisz == KeyEvent.VK_W) {
    temp_trans.rotX(Math.PI/10.0f);
    trans.mul(temp_trans);
    targetTG.setTransform(trans);
    } else if (klawisz == KeyEvent.VK_Z) {
    temp_trans.rotX(Math.PI/-10.0f);
    trans.mul(temp_trans);
    targetTG.setTransform(trans);
    } else if (klawisz == KeyEvent.VK_X) {
    temp_trans.rotZ(Math.PI/10.0f);
    trans.mul(temp_trans);
    targetTG.setTransform(trans);
    } else if (klawisz == KeyEvent.VK_C) {
    temp_trans.rotZ(Math.PI/-10.0f);
    trans.mul(temp_trans);
    targetTG.setTransform(trans);
    } else if (klawisz == KeyEvent.VK_M) {
    if(skala > 0.1f) {
    skala -= 0.1f;
    } else {
    skala = 0.0f;
    trans.setScale(skala);
    targetTG.setTransform(trans);
    } else if (klawisz == KeyEvent.VK_N) {
    if(skala <= 3.0f) {
    skala += 0.1f;
    } else {
    skala = 3.0f;
    trans.setScale(skala);
    targetTG.setTransform(trans);

    OK, using the tornado example. i want the point where the 'tornado' meets the 'ground' to spin so that the 'tornado', well, looks like a tornado, spinning around a specific, i.e. x,y,z pixel. instead i have a tornado that seems to be pulling doughnuts in the farm carving out a huge cirlce (like the aliens do) rather than what a stationery tornado would carve out (if there was such a thing).
    if it helps, think about the bounding box that surrounds an object or layer. the entire bounding box spins around the anchor point, or at least that's what it seems it is doing. it draws a huge circle that it ROTATES around rather then one point that is SPINS around. think about rotating a camera around it's Y axis, the whole box rotates, moving everything rather than spinning without moving. thanks.
    hope this helps.

  • How to always rotate objects around the same point, even using the right-click menu?

    I need some of my objects to always rotate around the same point. How can I select a point which will stay that way?
    Using the rotate tool resets after deselecting.
    Also, I'd like to rotate objects around a certain point even when using the right click > Transform > Rotate.
    Is it possible?

    Right, so this is where Illustrator falls short with respect you your need, but only in the sense that the reference point can't be made to stick. You can, however, use Smart Guides to make it so the point is easy to set at exactly the same location, (especially since your object has an anchor point there), manually before each rotation.

  • Snap rotate an Object by 60 degrees around a selected point?

    Hello,
    I am looking for a simple and precise way to rotate and copy an object at precisely 60 degree increments around a preselected point that is NOT the middle of the object.
    To restate: I want to be able to have all my objects at precise angles and be rotating around a selected pre-chosen point.
    I have tried many different ways with no luck.
    Can anyone help a noob?
    Dave-o

    I just checked the Download-able Help PDF (the Illustrator CS4 Online manual) and it is indeed documented under "Rotate an object by a specific angle" Unfortunately, it does not jump out off the screen.
    I understand why they don't ship manuals to reduce cost and keep a greener footprint, but I really miss them especially when you pay $500+ for a software suite. Next time I will RTFOLM! :-)
    Thanks again Scott
    Dave-o

  • Rotating an object about a specific point!

    Hello Guys!
    Have a new Problem!
    I want to rotate an object about a specific point. But up to now i only can rotate something about the x,y,z axis!
    Is this possible to rotate a scene about the point 1,1,1?
         Transform3D rotation = new Transform3D();
         rotation.setRotation(new AxisAngle4d(-x, -y, 0,((Math.PI / 2) - angle)));
    I don't handle it with Alpha because i needn't an animation!
    Please help me!
    Quh

    Hello,
    to rotate an Object A about the Point P you have to do the following:
    1. Get the Transform T which transforms P to Point (0,0,0)
    2. Apply T on A
    3. Rotate A (around (0,0,0))
    4. Transform A with the inverse of T
    leha23.

Maybe you are looking for

  • Error message "Live file system repair is not supported."

    System won't boot. Directed to Disk Utility to repair but get error message "Live file system repair is not supported."  Appreciate all help. Thanks. John

  • Purchase Register query

    Hi I wrote query for Purchase register SELECT M.DocNum AS 'AP Inv. #', M.DocDate as 'Date', M.CardName as 'Vendor Name',M.NumAtCard as 'Bill No. & Dt.',L.ItemCode, L.Dscription, (Select Sum(LineTotal) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'Base

  • Can't restore 9.5, can't uninstall, stuck in limbo!

    I should have known better. I had acrobat 9.5.2 installed, and was perfectly happy with it. I could view PDF docs, and scan from my scanner directly to a PDF document. Then after weeks of the updater reminding me, I finally let X1 install. Much to my

  • HT204380 tried suggestions and still cant connect to facetime on ipad.  Worked well 2 days ago.

    I tried all the suggestions in the article using facetime and still cant connect to facetime on ipad2.  Worked well 2 days ago.  Any other suggestions? iPhone4s works fine and ipad2 works fine except the new problem logging in to facetime on the iPad

  • Can't get AddressBook to import

    I've read pleas for help on the fringe of this subject, but not exactly my problem. I recently bought a new drive and transferred all my apps and files to it (reinstalling most everything). I'm having trouble, however, getting my AddressBook names an