ActionScript 3.0 :: Rotating Object Around Its Own Axis?

Jul 4, 2009

On the web there's a bunch of tutorial on how to rotate an object around a point ,or a stage axis..But how do we rotate this object around its own axis?

View 10 Replies


Similar Posts:


ActionScript 3.0 :: Rotating Round Y Axis Changes Size Of Object?

Oct 14, 2009

I have an flv file which I am playing through an flv playback component. The flv has a width of 320 pixels, however I wish to dynamically control the width of this flv, therefore I have placed it in a movieclip, and set the width to an arbitrary figure (400 in the example below). All of this works fine.

If I then decide to add a function to spin the Movie clip round 360Deg on the Y access, by the time my Movie Clip has done a full circle it is smaller than it was (now 361 pixels).

If I keep the Movie Clip at the same width as the original flv, there is no problem, and if I reduce the width before the spin, then post spin the Movie Clips width is wider.

Code:
import fl.video.*;
var vid:FLVPlayback;
vid = new FLVPlayback();
vid.source = "Media/Some.flv";

[Code]......

View 0 Replies

ActionScript 3.0 :: Remove The Mirror Effect When Rotating An Object On The X Or Y Axis?

Jan 29, 2010

I want to rotate the object on these axes, but it's causing a problem in that I want to flip the image 180 degrees only, however the image becomes mirrored when it flips and you must continue rotating another 180 degrees to get it back to normal.

Is there a way to take off the image mirror when rotating something?

View 1 Replies

ActionScript 2.0 :: Make An Object Move Along Y Axis Once It Has Reached Its X Axis Target?

Mar 2, 2005

I'm trying to grasp how functions and motion tweening works.

Heres my question. How do i make an object move along the y axis once it has reached its x axis target?

HEre is the code, that i got from here.

and what in this code is making the MC ease out?[code]...

View 14 Replies

ActionScript 3.0 :: Rotating Clip Along Y-axis?

Sep 16, 2009

I have a rectangular movie clip which I am rotating along its y-axis according to the position of the mouse, using this code:

PHP Code:

rotateClip.addEventListener(Event.ENTER_FRAME, doTilt);
function doTilt(e:Event):void {
var clipToTilt:MovieClip = MovieClip(e.target); 
clipToTilt.rotationY = (stage.mouseX-400)/10; // The stage width is 800
}

When I position the clip in the centre of the stage (x=400) the function works fine - the clip rotates from -40 to 40 degrees, and the perspective effect looks the same at each extremity. However, when I change the x co-ords of the clip to 600 it still rotates in the range -40 to 40 degrees; but it looks as if it's turned much further round at -40 degrees than it does at 40 degrees. Surely if it's rotating by the same amount it should look the same, wherever it's positioned on the stage? I've changed the vanishing point of the object to x=600, but it doesn't seem to make any difference.

The reason I'm using the centre of the stage as a reference is because I want the clip to appear un-rotated when the cursor is in the centre of the movie. Is there another value I should be setting, or have I misunderstood the concept of rotating along an axis?

View 4 Replies

ActionScript 2.0 :: Pausing MovieClips Rotating Around Center Axis

Nov 30, 2009

I have 4 movie clips rotating around a center axis. I know how to make each one pause individually, but I don't know how to get them all to pause when you roll over just one of them. Right now it only pauses the one you roll over and the others continue to rotate. I have this code pasted into the actions of each movieclip that is rotating.

Code:
onClipEvent (load) {
var radius = 220;
var speed = .6;
var xcenter = 450;
var ycenter = 300;
[Code] .....

View 1 Replies

ActionScript 3.0 :: Custom Class Registration - Rotating At 0 - 0 Axis And Not At The Centre Of The MovieClip

Apr 3, 2009

I posted a question regarding how to make a ladybug move around the screen and I managed to make a class that loaded a ladybug png then using a timer moves the bug around the screen...
but I have a huge problem...this has been bugging me all day and cannot find a solution...
The ladybug moves around the screen but rotates towards the moving direction before moving. The problem is that the ladybug is rotating at 0,0 axis and not at the centre of the movieClip. Is there a way to offset the registration point so that the ladybug rotates centred?

[Code]...

View 1 Replies

AS3 :: CS4 - Rotating Text Mc On Y Axis Makes The Text Fuzzy

Sep 29, 2009

I have a dynamic textbox, left justified, characters embedded, set on whole pixel x and y, 266 wide and 310 high. I then made that into a movieclip with registration at the center. I then use code to flip it on the Y axis. The text is clear before the first flip when you test the movie. Flipped 180 on the Y axis so that it is backwards it is fuzzy. Flip it 180 again so it is back in its starting position it is still fuzzy. I have tried doing it without code, just flip by entering a value in the transform panel for the Y axis, it still goes fuzzy.

I need the text on the backside of my panel to be clear. go here to see the full panel in action [URL] click through to "work" on the menu. I am attaching a very simple FLA with a flipping textbox mc and a plain textbox on stage to show how the text should look

View 1 Replies

Actionscript 3 :: Adobe Flash Cs4 - Object Rotating To Face Another Object

Jun 30, 2011

i am currently having trouble with my object rotating to face another object.currently it works fine as in this picture, my object at the origin will be able to rotate and move to the object in the 3 quadrants except the quadrant with positive 90degrees to 180 degrees, my object will rotate a few full rotation for some time while moving to the object does anyone know why? the sentence that i use to rotate is rotation += (foodLocationDegrees - (rotation - 90)) * .2; whereby food is calculated using

[Code]...

View 1 Replies

ActionScript 2.0 :: Grab An Object And Rotate It With An Object Which Is On It Rotating?

Oct 29, 2003

how can i grab an object and rotate it with an object which is on it rotating [meaning that the second object is on the same possition on the first object?] can i make it being horizontal all the time?

View 14 Replies

Flash :: Rotating Object To Face Another Object?

Jun 28, 2011

currently i have a function in which my object fish will move to a food i am having trouble getting it to rotate nicely to the food currently my function is as below.if the food is above the fish my fish rotation is 0 which is facing up, if the food is below my fish i will give it a rotation of 180 which will make it face down , however the rotation is too sudden it does not give a nice and realistic effect of rotating to the food.how can i make it when rotating to move some distance and at the same time rotate? because it cant rotate to the food in the same spot as it would not be realistic.

public function moveToFood():void
{
var foodTarget:Food = fishArray[fishArray.length - 1];

[code]......

View 5 Replies

Rotate Object Around Center Axis?

Oct 4, 2010

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:[url]......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?

View 3 Replies

ActionScript 3.0 :: Moving An Object Up And Down The Y Axis?

Apr 21, 2011

i'm trying to use actionscript so i can make an object move up and down the Y axis by inputing numbers into a textbox. However at the moment my object starts in the centre and then when i enter a number it only goes down, and im not too sure how i can use negative numbers to make it travel up the y axis. I was thinking of using the numbers -10 - 10 so -10 would go down and 10 go up. Here is my code

Actionscript Code:
// EXAMPLE WHERE TEXTBOX USED TO POSITION A BALL ON THE STAGEpackage {  import flash.display.Sprite;  import flash.display.Stage;  import flash.text.*; 

[code]......

View 2 Replies

ActionScript 3.0 :: Reload Object In Z-Axis?

Mar 2, 2011

I have a problem. I got an object on the z-axis that goes back to position 500 on the z-axis whenever it hits 0. I want it to move to a random position on the X-Axis.

So far so good, but when it goes back, I want it to choose another random position. Instead it returns in the same angle in which it left the screen so it will eventually leave the screen. Again, I want it to go like left, right, right, left or whatever, but not the same way all the time. [code]...

View 0 Replies

Professional :: Rotate A Object Around Center Axis?

Oct 4, 2010

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: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??

View 5 Replies

ActionScript 2.0 :: Restricting The Movement Of An Object On Its X Axis?

Jan 23, 2009

I have an object that is being moved along it's x axis a certain amount each time an button is pressed. I want to be able to restrict the movement of that object along it's x axis so that it can not go past a certain point.

View 2 Replies

ActionScript 2.0 :: Spin Object With Ease On It's Axis?

Jul 16, 2009

wanna spin an object on its axis 45 degrees each time by pressing 4 buttons, so 1st button moves it 45 degrees, 2nd button moves a further 45 degrees and so on...I've got the sliding of an object left to right or up and down nailed to this code

onClipEvent (load) {
_root.newposition = "null";
}

[code].....

View 7 Replies

ActionScript 2.0 :: Move An Object Along The X Axis Continuously?

Jun 30, 2010

I want to move an object along the x axis continuously after a button is pressed until the object reaches a point. How can I achieve this?

View 5 Replies

ActionScript 3.0 :: Rotate Object Around Center Axis?

Oct 4, 2010

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: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?

View 3 Replies

ActionScript 3.0 :: Flip Object Over An Axis When Using Drag And Drop?

Dec 17, 2009

how I can flip a movie clip during a drag and drop when it hits a certain axis on my stage?  So If I have the letter L and am dragging it from right to left.  When I hit the mid way point of my stage I wand that L to flip and look like a backwards L, but allow me to keep dragging.

View 18 Replies

ActionScript 3.0 :: Make An Object Move Along The X Axis In One Direction?

Sep 7, 2011

is there a easy way to make an object move along the x axis in one direction then when it reaches that direction it moves back. with a smoove movement.

View 1 Replies

ActionScript 2.0 :: Make An Object To Move Randomly Across X-axis?

Jan 2, 2004

I'm trying to make an object to move randomly across x-axis and while it moves back and forth it also scales in width.

View 3 Replies

MX Rotating Object On Mouseclick?

Sep 17, 2009

I am trying to get an object to rotate similar to the globe on this sitei have found the

code:
onClipEvent(enterFrame){
_rotation += (Math.floor(180*Math.atan2(_ymouse,_xmouse)/Math.PI)+90);

[code].....

View 5 Replies

IDE :: Make An Object Rotating?

Jan 24, 2010

I am using FLASH CS4 and would like to know how to rotate an object?

View 4 Replies

ActionScript 2.0 :: Rotating A 2d Object

Nov 18, 2002

Im making a clone of lunarlander in flash mx and i cant quite figure out how to make the ship's movie clip rotate left and right.How can i make a movie clip rotate left and right?

View 1 Replies

ActionScript 2.0 :: Move An Object Along The X Axis Continuously After A Button Is Pressed?

Jun 30, 2010

I want to move an object along the x axis continuously after a button is pressed until the object reaches a point. How can I achieve this?

View 9 Replies

ActionScript 3.0 :: Construct Coordinates With Distance In Meters On The X-axis And Time In Seconds On The Y-axis

Nov 27, 2011

I am trying to construct coordinates with distance in meters on the x-axis and time in seconds on the y-axis, without using the timeline. How can I draw the divisions on the x-axis and y-axis ? Or I better draw the whole thing.

var my_shape:Shape = new Shape();addChild(my_shape);
my_shape.graphics.lineStyle(3, 0xFF0000, 1);my_shape.graphics.moveTo(50,50);my_shape.graphics.lineTo(50, 300);my_shape.graphics.lineTo(500, 300);

View 9 Replies

ActionScript 3.0 :: Tweens Objects Return To Their Original Position - Start Jumping Between Y Axis 200 And Y Axis 83?

Aug 7, 2009

I've put together this simple code for an SWF with three roll over images (called: Training, Resources and Contact).When I roll over Training I would like the symbol Training_txt to tween its alpha to 1 (from 0) and tween its y axis to 220 (from 83).When I roll out of Training I would like to run the two tweens in reverse.
 
This works fine for each of the three roll over images, so long as each tween is allowed to fully execute before a new tween is started. The problem arises if i quickly move the mouse curser between the three roll over images before the previous tweens have finished executing.In this instance, the tweened objects start to behave erratically. They usually return to their original position as per the roll_out tween but then start jumping between y axis 200 and y axis 83 (without tweening - they just appear).

Code below -
 
stop();
import fl.transitions.Tween;
import fl.transitions.easing.*;[code]..........

View 1 Replies

Slow Down An Object That Have Rotating CW 1 Time?

Aug 16, 2010

Without adjusting the fps how would I slow down an object that I have rotating CW 1 time?

View 4 Replies

Object Following Mouse, Rotating Left And Right?

Oct 11, 2010

I am working in AS2 and I have a flash project that is almost complete but I would like 1 thing modified.I have a fish image following my mouse.

(script below)
onClipEvent (enterFrame) {
_root.yChange = Math.round(_root._ymouse-this._y);[code]...........

The problem is that I would like the fish image to "turn" and face the direction of the mouse. Currently, as is, the fish follows the mouse fine when the mouse is moving to the right, but when it goes to the left the fish swims backwards rather than turns and swims the correct way following the mouse to the left.How would I modify the script to get the fish to turn and always swim forward when going left and right?

View 3 Replies







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