ActionScript 3.0 :: Rotation Around Internal Point On Click?

Sep 24, 2010

greetings, first of all sorry for my english. This question will probably looks more difficult than it is.

I have movieclip which I want to rotate around internal point few angles with click on certain button, and I manage to do it, but I want to see motion, or even put ease not only to immediately pop up in the place.

Code:
import flash.geom.Matrix;
import fl.motion.*;

[Code]...

View 5 Replies


Similar Posts:


Actionscript 3 :: Moving A Point With Rotation Doesn't Change The Point XY?

Jul 15, 2011

i have the follow issue :

I have a point which is setted at the border on a component, with changed transform point to the center of a component in order to match the component rotation.

the important part is when i try to get the point XY after rotation - they remains the same as before rotation.

how to get XY, after rotation ( changeing point.rotation property to specific degrees of rotaion )

View 2 Replies

Dial In Anchor Point For 3D Rotation?

Jul 13, 2009

Flash knows where the anchor point is in 3D space in order for the symbol to rotate around it, but I can't seem to figure out how to see the coordinates of the anchor point or type in new ones. Please tell me how to do this. I am already very annoyed that Lynda, a pay service, doesn't think this is vital information. Apparently they think we would never want to do anything more visually stimulating than one simple spinning logo! But I digress...

Just to be clear, I know how to move the anchor point visually on the stage, but I want accuracy. I want to be able to give two symbols the exact same coordinates to rotate around.

View 3 Replies

ActionScript 3.0 :: Rotation Point Outside Of An Object?

Nov 9, 2009

Im using A

Code:
function enterFrameHandler(event:Event):void
{

[code]........

View 7 Replies

ActionScript 3.0 :: Set Rotation Center Point?

Jul 9, 2010

I am new in action script 3... i am not able to rotate movie clip from center point(movile clip is a containear holding many clips).

View 9 Replies

ActionScript 3.0 :: Rotation Around A Point, With Easing?

Jan 6, 2012

I have encountered a need to build what amount to classic boardgame spinner.

1. When you click on the spinner it spins clockwise

2. There are several places where it can stop.

When the user clicks the spinner I run a method to determine where (what target) it should stop on.

How can I make the spinner spin a few times, decrease in speed (ease) then stop at a certain angle?

View 3 Replies

ActionScript 2.0 :: Setting The Rotation Point?

Oct 26, 2004

i'm working on a flash game at the moment, and i would like to know if i am able to set the point that the movieclip rotates around using actionscript.

i don't want to do it by simply moving all of the contents of the movieclip closer or nearer. is there any other way of doing it? i couldn't find any simple functions for it. am i just going to have to use some complicated maths?

[edit] rotation point, aka, registration point.[/edit]

View 3 Replies

ActionScript 2.0 :: MovieClip Rotation Point?

Nov 14, 2007

I am making a 'simple' template builder in flash which allows the user to add/remove text boxes and images to the stage.
I can rotate any of the movieClips fine but it rotates from the top left and i want it to rotate from midpoint. Is there a way to set the midpoint/rotation point using actionscript?

View 1 Replies

Flash :: Rotation Reference Point Centering?

Jan 30, 2011

I have the following problem. I have an MovieClip in a holder MC. I would like to turn the inner MC X with 'rotation' parameter, and still keep it in the holder mc to the right and bottom of the holder MC reference point. So after turning it should look like thatanyone can tell me how to do that? Basically a function that takes any X rotated in any degrees through X.rotation = ... and puts it back in place in the holder MC.

View 3 Replies

Flash :: Change 3D Registration Point For Rotation In AS3

Apr 18, 2011

Has anyone got a bit of code I can use to change the center point DisplayObjects rotate around in a 3D space? I need it to work with rotationX, rotationY and rotationZ. I know theres a workaround of wrapping every object in aother sprite and offsetting the x & y positions but I'd much prefer a math solution. As an example of the problem, this code should make a star shape:

[Code]...

View 1 Replies

ActionScript 3.0 :: Change The Rotation Point Of A Sprite?

Feb 4, 2008

I'm attempting to write a racing game. I've loaded in my image, I brought it to the stage and now, all I want to do is rotate it from its' center and not upper left corner.

The code:

racer.rotation += 5;

rotates from the upper left corner. How do I rotate from the center of the car/sprite? I've tried putting it into a container but I'm unsure on the coordinates of the container because I tried to set the x,y coordinates to half the sprite image but y'know, it's not doing what I expect it to.

ActionScript Code:
if (arrowLeft) {
var container:Sprite = new Sprite();

[Code]....

I will never sneer at another racing game! I didn't think it would be this hard to do a simple rotate of an image!

View 3 Replies

ActionScript 3.0 :: Defining Rotation (pivot) Point

Sep 11, 2008

I am rotating some objects which their rotation (pivot) point is not at the center. My aim is to rotate from the center of the shape. How can I overcome this?

View 1 Replies

ActionScript 3.0 :: Choose Rotation Point And Direction?

Nov 11, 2010

I am creating a a small site with a spinning menu but I want it to spin only in onedirection ( clockwise) and around the centre of the 3 point cross I am using as a menu.I have this currently to rotate the menu but I want it to only rotate on way and around centre.

Code:
content_mc.draw_btn.addEventListener(MouseEvent.CLICK,drawClick);
function drawClick(e:MouseEvent):void{

[code]....

View 2 Replies

ActionScript 2.0 :: Rotation Around Simulated Registration Point?

Oct 31, 2003

I want to have arm movement such as the forearm rotating about the arm where the elbow should be the problem is the registration point is at the shoulder for arm. I want the forearms registration to be constantly equal to a simulated registration point where the elbow should be as the arms registration point would be at the shoulder. I need to do it without nesting (a movieclip within another) is it possible. I tried using a constant distant between the two clips but it doesn't work. Don't know I have to use trigonometry or not

I think in brief what I trying to accomplish is
onEnterFrame=function(){
arm._x=shoulder._x
arm._y=shoulder._y
arm._x=simulated_x (where elbow would be)
arm._y=simulated_y (where elbow would be)
}

View 7 Replies

Professional :: 3D Rotation For Symbol About Y Axis Using Pivot Point

Nov 13, 2011

I am trying to rotate a symbol about the y-axis, 45 degrees one direction, then back to center, then 45 degrees the other direction. Seems like a relatively simple task, except here is what happens.

Here is the object with no rotation:
Here is the object rotated exactly 45 degrees:
And here is the object rotated exactly -45 degrees:

I need the object to rotate the same as it did the first time but in reverse, otherwise "45" and "-45" are generally worthless numbers to refer to. Is it something to do with the pivot point? I made sure the registration point was in the center when I created the symbol. It doesn't seem to be pivoting the object around the center though. How do I rotate about the y-axis using a pivot point that is actually in the center and gives the same (but opposite) effect when rotating it one way versus the other?

View 1 Replies

ActionScript 2.0 :: Random Rotation Around A Fixed (Central) Point

Jan 15, 2009

I have a project on the go which has a compass that I would like to have move randomly around a fixed central point (giving the idea of changing direction).Would anyone be able to help me out with the coding to get this to work?

View 1 Replies

ActionScript 3.0 :: Make Shape Rotation At It's Center Point?

Jun 14, 2011

I draw a shape,like follows:

var shape1:Shape;
shape1=draw();
addChild(shape1);
shape1.rotation=50;

[Code]....

Then I want to rotate the shape at it's center point(200,202) by using shape1.rotation=50,but I find the shape don't rotate at the the center of it's shape. How to realize the function which make shape rotate at its center point?

View 4 Replies

Flex :: Converting Sprite To Bitmapdata With A Different Registration Point And Rotation

May 22, 2011

I'm trying to convert a Sprite that I have into BitmapData so I can perform some collision detection. There are a few things about the way the Sprites are used that is making this more difficult than I expected:

The Sprite itself is a container which holds another Sprite that actually has a box drawn in it. The inner Sprite is positioned negative half its width & height so that it can be rotated from the center via the container. The container may be rotated at any angle at any given time

So my approach thus far has been attempting to draw the outer Sprite onto a new BitmapData object with a Matrix to account for the difference. Whilst I can use a Matrix to make this work for one particular rotation angle, I cannot find a way to make it work for any rotation.

Here's what I'm doing to draw onto the new BitmapData:

var p:Product = getProduct(); // Product is the container with the inner sprite
var bounds:Rectangle = p.getBounds(stage);
var bd:BitmapData = new BitmapData(bounds.width, bounds.height, true, 0x00FFFFFF);

[Code]....

Translating by the same amount as the previous example will no longer work here, and the box will still be cut off. I've looked around at some solutions posted before or suggestions from other people but they don't seem to work for me due to my container Sprite and rotation.

View 1 Replies

Actionscript 3 :: Rotation Of A Line Based On Fixed Point In Flex4

Sep 27, 2011

As in the figure i have three lines out of which line1 and line2 are fixed. line3 is derived from line1 based on some angle say 70.I try to rotate the line3 but it deviate from the point x1 and x2. I try the code like this

[Code]...

View 2 Replies

Actionscript :: Count The X And Y Coordinates Of A Point From The Object's Rotation (angle) And Leg's Length?

Feb 2, 2012

how I can count the B point's coordinates (see attached image... or not as I am a new user...pf!). I know the arrow's rotation - so the angle (let's say it is -120), A's coordinates (0, 0) - A is the middle point of the arrow, and that the distance between A and B is 50 px.

View 1 Replies

ActionScript 3.0 :: Tween Rotation 180 Degrees On Each Button Click

Mar 30, 2011

I have set up a motion tween using the flash tween class to rotate an image 180 degrees. However, if I should want to work wit hthe image from that point (say click the button again and have it rotate another 180 degrees back to its original position) I can't. It will simply run the tween again because my function specifies to go from 0 to 180. How I can use the tween class to rotate this image 180 degrees on each button click?

Code is below:
import fl.transitions.*;
import fl.transitions.easing.*;
import fl.transitions.Tween;
rotation1_btn.addEventListener(MouseEvent.CLICK, rotateThePicture);
function rotateThePicture(event:MouseEvent) {
//IMG11_mc.rotation += 180;
var PicRotation:Tween= new Tween(IMG11_mc, "rotation", Strong.easeInOut, 0, 180, 5, true);
};

View 2 Replies

Actionscript 3.0 :: Click And Zoom 3D Carousel - Rotation Modification

Jun 22, 2009

I was working with the sample code from the Click and Zoom 3D Carouse tutorial and was wondering if anybody figured out a way to have full rotation?

When the demo tutorial files first load the first image is the energy drink. The last is the cat. When you click on the cat first, the carousel, rotates all the way around to it rather than just one slot back. Similary, when at the cat (the last image) and clicking on the energy drink (the first), it rotates all the way around back rather than just one slot forward.

How do you make it rotate seamlessly both ways?

View 1 Replies

ActionScript 3.0 :: Determine The "rotation Point" (axis?) Of An Object?

Feb 19, 2009

How do you determine the "rotation point" (axis?) of an object?

A sprite/movieclip that has been loaded using a Loader has its rotation point set to the upper-left corner. What I want to know if how I manually (using ActionScript) set it to the center.

View 9 Replies

ActionScript 2.0 :: Point And Click Engine?

Oct 9, 2009

well so far i have this [URL].. and there are some collision problems

the player is _root.loadplayer
the walls are _root.block
the player mc is _root.loadplayer.MC
i'm not sure how to fix this problem :s
but heres the AS code for you to look at

[Code]...

View 2 Replies

ActionScript 2.0 :: Button And When U Click It, 1 Point Is Subtracted From Score?

Mar 30, 2009

So i have a button and when u click it, 1 point is subtracted from your score, and it takes you to frame 2. So i said this:

on(press){
gotoAndPlay(2)
_root.money-=1
}

This works okay, but it only plays frame 2 every other time you click it, but adds one to your score everytime you click it. What can i do

View 1 Replies

ActionScript 3.0 :: Move Movieclip Around A Circle Using Point And Click?

May 5, 2011

It's the beginning of a Monkey Island / Grisworld The Goblin kind of ultra short and simple game. Actually this is the only think I have to figure out.

Actually it already works if you click the x where it's positioned on the screenshot, but it doesn't work other places. And yes I've tried everything, and I'm just nok smart enough to figure this out.

More precisely it's the alternative path, after the arrow collides with the circle, that's causing me problems - since it's going to find it's way to the point clicked on stage.

View 1 Replies

ActionScript 3.0 :: Click The Play Button To Resume From That Point (wherever Paused From)

Feb 14, 2011

My Original Post:I have been designing a visual presentation in Flash CS5, there are a few movie clips on the stage that are set to play at a certain time/frame. The problem I am having is that I am not familiar with coding/actions. I want to have a play and a pause button so I can pause at any point (not a specified frame) and discuss with the audience. Then I want to be able to click the play button to resume from that point (wherever I paused from). I hope to get help and be able to learn from your answers. I don't know how clear my question is, but I can clarify if you need me to... A Reply:you can stop/play any movieclip by using the movieclip's reference:

[Code]...

View 1 Replies

ActionScript 3.0 :: Dropdown Menu RollOver Removing Click Point

Feb 8, 2010

I have a site which is basically made up of two swfs. TopNav.swf, which is a dropdown menu, and container.swf. TopNav.swf is loaded into the container.swf. Right underneath TopNav is a movieClip that serves as a link. But for some reason once the dropdown menu rolls over the movieClip, the link disappears and is no longer clickable.

View 1 Replies

ActionScript 3.0 :: What Is Internal And The Use Of Internal In OOP

Jun 26, 2009

I am unknown about internal in OOP. Is there any body about internal. How we can use this in pratical world

View 1 Replies

ActionScript 3.0 :: Rotation Center Is In Left Of The Image - Aren't 3D Rotation From Transform Panel

Jan 7, 2010

I have a movieclip and when I do 3D rotation from Transform panel, It rotates perfect, center is in the middle of image, and when I apply mc.rotationY, rotation center is in left of the image, aren't 3D rotation from Transform panel and mc.rotationY from AS same? what's up?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved