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


Similar Posts:


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

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

Flash :: Change Position Of Registration Point In CS5?

Sep 13, 2010

Is there a way to change the position of the registration point inside a Movie Clip using Flash5 ?I've found stuff online for older Flash versions but not CS5.

View 2 Replies

Flash 9 :: Why Doesn't The Registration Point Change

Jan 31, 2006

I have a symbol created out of a bitmap image. When I converted the "bitmap" to a "movieclip" object, I selected the center registration point in the dialog box. After the symbol is created an placed on the stage, I can seen the registration point at the center of the movieclip. Nevertheless, if I check the coordinates of the movieclip, it refers to the top left corner instead of the registration point. The most strange thing is that if I try to check the coordinates of the movieclip using Actionscript - something like trace("x: " + mc._x + "y: " + mc._y); - it do refers to the center point of the movieclip. So how can I have the coordinates during design time the same as during runtime? Why do I always have to refer to the top left corner and not to the ACTUAL registration point?

View 9 Replies

Flash :: Change The Height Of A Movieclip From A Registration Point?

Jan 1, 2012

Is there a way to extend only the bottom part of a dynamic Movieclip? I tried to change the height or to scale my mc but it always makes the change relativity to the center of the Movieclip. I guess I should define a registration point and change the height according to it but i'm not sure of how to do it

View 2 Replies

Flash :: Change Registration Point Of A MovieClip To Be Center Of Width And Bottom?

Oct 13, 2010

I have a MC in an AS3 animation and I want to increase its height from bottom to top which would mean that the registration point should be bottom of the MC and center of width (horizontal center).

View 2 Replies

Flash 10 :: Change Registration Point (left Center Corner Etc) Of Object

Oct 29, 2010

When you create shape on stage and right click and chose create object you can chose Registration point for the object..you chose what corner will be used as center of coordinates for this object. Now onice you create object is there way to change this registration point e.g. i created it in center now i want to to be in upper left corner?

View 2 Replies

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

Professional :: Change The Registration Point

Mar 20, 2008

I have a movie clip on my stage with various elements in it. When I edit this movie clip all the coordinates for the various elements have really random values because the registration point is not set to the top left corner of the symbol but I can't find any way to change the registration point - nothing I've found online so far works.

View 3 Replies

Change Registration Point Of Uiloader?

Feb 3, 2010

How can i change registration point of uiloader?

because that loader loads images which needs to be zoomed for productional purposes, but it does not zoom the center, it zooms through to reg point.

View 5 Replies

Professional :: Change Registration Point XY?

Jul 5, 2011

how?

View 1 Replies

ActionScript 3.0 :: Set And Change Registration Point Of A DisplayObject?

Dec 15, 2009

analog to the Flash Authoring Tool, set and change the registration point while instancing a new DisplayObject?

View 4 Replies

Professional :: How To Change Registration Point Of Object

Dec 5, 2010

I have an object which is converted into a symbol. I double click on this object/symbol and it goes into its own seperate timeline. For my coding purposes I would like to know how to change the registration point of the symbol so it moves along or is addjustable on a symbols its own timeline so a can create animations on an objects timeline without screwing up my codeing because objects don't register when their moved away from the registration point the compiler still thinks that the registration point is where it was previously.

View 8 Replies

Change Registration Point Of A Movieclip After You've Made It?

Aug 16, 2006

Is there a way to change the registration point of a movie clip after you've made the movie clip?

View 5 Replies

ActionScript 3.0 :: Change The Registration Point Dynamically?

May 7, 2010

How to change the registration point dynamically in As3.0

View 2 Replies

ActionScript 2.0 :: Change The Registration Point Of An Object?

Mar 11, 2012

I want to rotate the movieclip about a point that is not on the registration point.

The current registration point is at the top left and I want to rotate it about the coordinates: _y = -178, _x = -24.5

View 8 Replies

ActionScript 3.0 :: Change Registration Point At Run Time?

Aug 1, 2009

how to change the registration point of a movie clip at run time using action script 3.0.I have gotten a lot of code in the past but none of it worked and all of it was not for 3.0 but other versions.

View 4 Replies

Professional :: Creating Preloader - Cannot Change Registration Point

May 5, 2010

I'm trying to create a needle gauge type preloader, and I've created the needle and made it a MC and set the registration point to bottom middle, but it still rotates on a centered axis. This is the tutorial I'm following: [URL]

View 3 Replies

Actionscript 3 :: Change The Registration Point Of A Video Object?

Mar 3, 2011

Is there any way to change the registration of a video object (so that you can apply a tween effect)?

View 1 Replies

Actionscript 3 :: Change The Registration Point When Using Bitmapdata.draw?

Dec 5, 2011

I have a movieclip on stage that I draw into a bitmap, how do I change the registration point, the code below produces bitmap with half chopped off:

var bitmapData:BitmapData = new BitmapData(mc.width, mc.height, true, 0x00FFFFFF);
var matrix:Matrix = new Matrix();
matrix.translate(0, -mc.height/2);

[Code].....

View 1 Replies

ActionScript 3.0 :: Change Registration Point Of A Movie Clip?

Jan 15, 2009

I have a fairly complex movie clip with a bunch of animations in it, and it seems that the registration point for it is at some random location in the middle of it all.

View 0 Replies

ActionScript 2.0 :: Change The Registration Point Of A Symbol After It Has Been Created?

Nov 19, 2002

Is there any way to change the registration point of a symbol after it has been created? I can't seem to find information one way or the other anywhere

View 14 Replies

IDE :: Change Registration Point (left Center Corner Etc) Of Object

Oct 28, 2010

When you create shape on stage and right click and chose create object you can chose Registration point for the object you chose what corner will be used as center of coordinates for this object. Now onice you create object is there way to change this registration point e.g. i created it in center now i want to to be in upper left corner?

View 5 Replies

ActionScript 3.0 :: Dynamically Change Movie Clip Registration Point?

Feb 10, 2011

Is that possible?

View 2 Replies

ActionScript 3.0 :: Change Registration Point Dynamically / Rotate Any DisplayObject By It's Center?

Jun 15, 2009

The Rotations3DUtility is writed by myselft to make any DisplayObject rotate by its horizontal center, but the effect isn't perfect.[code]...

View 2 Replies

Professional :: Change Registration Point (left Center Corner Etc) Of Object?

Oct 28, 2010

When you create shape on stage and right click and chose create object you can chose Registration point for the object

you chose what corner will be used as center of coordinates for this object. Now onice you create object is there way to change this registration point e.g. i created it in center now i want to to be in upper left corner?

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

Flash :: Center The Registration Point For Dynamically Imported MovieClip?

Mar 2, 2011

I'm trying to see if there's a way to change the registration point of a MovieClip that's importing an image dynamically?Here is my code where I add an image to an "overlayHolder":

overlayBitmap = _loader.getBitmap( _data.id + "-overlay_image" );
overlayHolder.addChild(overlayBitmap);
overlayHolder.x = _data.overlay_left;
overlayHolder.y = _data.overlay_top;

What I need to do is rotate this image later on, upon interaction from someone, but need it to rotate with a center-registration.I've seen a bunch of tutorials/forums talk about centering a registration point when you're drawing a Sprite on the stage, but not when you're importing an image.

View 1 Replies

Flash :: Unable To Load Image On Movieclip Registration Point

Aug 19, 2011

To load an image onto a movieclip, the mc's registration point must be top left. Is there a way of loading the image on the whole movieclip, when it's reg point is not top left. In other words to set where to start putting the image in reference to the movieclip

View 2 Replies







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