ActionScript 3.0 :: RotationY/PerspectiveProjection/width Calculation?

Dec 18, 2009

Basically I have used PerspectiveProjection so I may rotate multiple images about their centre so they don't appear differently rotated because of their x-position on the stage.My problem is calculating the width of the rotated images. When I rotate an image 45 degrees, my width ends up being ~146, but based on the following (my comments from my code), it should be closer to 141:

Code:
// ^C
// / |

[code]......

View 7 Replies


Similar Posts:


ActionScript 3.0 :: RotationX And RotationY And RotationZ And PerspectiveProjection Together Break MouseEvent?

Apr 21, 2009

When I change the rotation of a movie clip, and apply PerspectiveProjection, all mouse events applied to that movie clip and all the movie clips inside that movie clip break.The mouse event bellow will not work for me.
 
a_mc.rotationX = 1;
a_mc.rotationY = 1;
a_mc.rotationZ = 1;[code]........

View 2 Replies

ActionScript 3.0 :: Using Local3DToGlobal With PerspectiveProjection?

May 8, 2010

I'm using local3DToGlobal with PerspectiveProjection.  My problem is that when I don't use PerspectiveProjection local3DToGlobal works as expected. But when I use PerspectiveProjection local3DToGlobal appears to give a random Point that doesn't make sense to me.  However, if I have the local3DToGlobal in a function that's called with the Event.ENTER_FRAME it works as expected.
 
The red circle is suppose to follow the black circle end of the stick graphic. The red circle is using regular x and y positions, while the stick is using x, y and z (3D). If you call the onEnterFrameMethod directly the red circle wont wrap the circle end of the stick.  If you comment out the PerspectiveProjection code, then the red circle will wrap the circle end of the stick.  If you uncomment the PerspectiveProjection code, and then use an event listener to call the onEnterFrameMethod, the red circle will wrap the circle end of the stick.
 
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Point;

[code]....

View 1 Replies

ActionScript 3.0 :: ProjectionCenter Does Not Affect PerspectiveProjection?

Dec 28, 2009

I am manually drawing 3D lines on screens. I am NOT using the native X Y Z properties of Sprite.private var displayCoordinates:Vector.<Number> = new Vector.<Number>;

private var displayMatrix:Matrix3D = new Matrix3D();
var pperspectiveProjection = new PerspectiveProjection();
pp.projectionCenter = new Point(sizeX/2,sizeY/2);

[code].....

View 1 Replies

Flex - Display Object That Has Been Transformed With A PerspectiveProjection?

Jul 20, 2010

I'm currently transforming some objects to make them appear far away using a PerspectiveTransform. This works well, but I have no way of knowing where on the screen the object is displayed. The x and y coordinates are the coordinates of the object if it were at z=0. How can I compute the display coordinates of my component?

View 1 Replies

ActionScript 3.0 :: Correction Applied To The Rotation Y Angle When Using PerspectiveProjection?

Dec 28, 2010

I have a stage with and height of :600x400 On this stage i have 3 squares that have a centerpoint in the middle. The square are 90 (width) and 80 (height)The first square is aligned to the left site and the second one in the middle and the third one on the right  The perspectiveProjection is setup using the middle of the stage as it projectionCenter.When i rotate all squares to 90 degrees (rotationY) than only the middle one is now not visible anymore, at that point i want to switch the image inside the square. But at 90 degrees the left and right squares are not invisible..  For the left square that point wouldbe at 90 - 22, and the right one 90 + 22.   Is there a way to calculate the correction value (22) in this example?
 
What i don't want is to give every square it's own perspectiveProjecten , then it would work but you have a completely different3D rotation.The only thing that goes wrong in my example is that the image from the left and right square are not changed at the right time, because 90 degrees on the left square does not mean it it not visible at that point.
 
And here is the code:
 
import flash.display.MovieClip;import flash.geom.Point;import flash.geom.PerspectiveProjection;import fl.transitions.*;import fl.transitions.easing.*
var squares:Array = [c1, c2, c3];

[code]....

View 13 Replies

ActionScript 3.0 :: How To RotationY A Loaded Jpeg

May 17, 2011

I am trying to apply rotationY/X/Z to an externally loaded image. The problem is that when I rotate the image in '3D', it does not appear. When I apply normal rotation, the image does appear. I have verified that the jpg is loaded, just does not display after rotationY/X/Z. The code below are snippets of my attempts.

PHP Code:
//LOAD IMAGE
public function load_img():void

[code].....

View 1 Replies

ActionScript 3.0 :: RotationY On MC With Image Inside?

Sep 11, 2009

Is it possible to use rotationY on an MC that has an image inside? I am trying it and it does not seem to work. Is there another way to do this?

View 1 Replies

Actionscript 3.0 :: RotationY To Center Of Stage [CS4]?

Feb 22, 2009

I have this movieclip which i would like to set an rotationY in 3d space. I want the rotationY angel to have a value so that the right side of my movieClip faces the center of the stage. Like an arrow in a dartboard. I thought this was easy to accomplish using simple trigonometry like this: (before the testMC is rotated in Y space, it has a widh of 1000) testMC.rotationY = -(Math.acos((stage.stageWidth/2)/(1000))*(180/Math.PI));

View 1 Replies

Actionscript 3.0 :: Property RotationY Not Found

Feb 23, 2010

I have this code which works fine in the main.swf, but the preloader.swf (which is the container swf file) generates this error: ReferenceError: Error #1069: Property rotationY not found on com.control.MenuControl and there is no default value.URL...)[code]

View 1 Replies

ActionScript 3.0 :: RotationY And X Handling Guidelines?

Jul 30, 2010

I've to do this handling on the x axis...so rotationX and x coordinate but i think is the same...i need the concept of that

View 2 Replies

ActionScript 3.0 :: What Do ScaleX / ScaleY / RotationX / And RotationY Do

Aug 2, 2009

What do scaleX, scaleY, rotationX, and rotationY do?I'd like to test it out myself but I'm completely new to Flash CS4 and I don't know how to control these values outside of ActionScript

View 3 Replies

Actionscript 3 :: Reflect-class Applied On RotationY

Mar 14, 2010

I'm using a class which applies a visual reflection-effect to defined movieclips.I use a reflection-class from here:link to source.It works like a charm except when I apply a rotation to the movieclip.In my case the reflection is still visible but only a part of it.What am I doing wrong? How could I pass/include the rotation to the Reflection-Class?[code]

View 2 Replies

ActionScript 3.0 :: RotationY And RotationX Causing A Flickering?

May 26, 2010

I'm using(tweening) the rotationY and rotationX properties on movieclips a layer above a background, bitmap or video, in two respective projects. There is a flickering of the movieclips and some bizarre distortion going on. I can't seem to find anything on the web about this, -has anyone else encountered this problem? Is it a known bug? Is there a workaround?

View 2 Replies

ActionScript 3.0 :: Tween RotationY Deforms The Object?

Feb 26, 2009

Code:
TweenLite.to(this, 0.5, {x:this.width/2, y:this.height/2, rotationY:180});

scale my object horizontally ?After the rotation it is wider....

View 1 Replies

ActionScript 3.0 :: 3D Rotate (rotationY) Externally Loaded Image?

May 3, 2011

I am trying to use rotationY,X,Z on an externally loaded image. The image is displayed properly when no 3D rotation is applied, but does not appear afterwards. I have tried various things: loading the image into a bitmap, loading that bitmap into a Sprite/MC. What am I missing?Just to be sure, regular rotation works fine, e.g

PHP Code:
pic.rotation = 2;
....axis rotation does not

[code].....

View 1 Replies

ActionScript 3.0 :: Moving MovieClip With RotationY Cancel Others On Stage

Mar 30, 2009

When I move a movieclip with the rotationY option around the stage, the other mivieclips are cancelled from the stage when the rotated movieclip pass over the others. I use flash actionscript 3 CS4.

View 1 Replies

ActionScript 3.0 :: Use RotationY Relative To The Parent Movie Clip?

Mar 21, 2010

I am using the following code to rotate movieclips with a nice 3d flip effect. var flipTween:Tween = new Tween(mc,"rotationY",Strong.easeIn, mc.rotationY,mc.rotationY + 180,time,true)

However the rotationY is relative to the stage not the parent movieclip of mc.I.e: If the rotation effect on the movieclips looks different depending on where on the stage they are. I know that with the roation tool in cs4 you can rotate relative to the parent movie clip, how can you do this in AS3 code.

View 5 Replies

ActionScript 3.0 :: Access Of Possibly Undefined Property RotationY

May 12, 2010

I'm getting an error of that type, thrown for a variable whose type is Sprite.To me that makes no sense at all because Sprite has a public inherited property of rotationX and rotationY.Just as a test I changed the variable type to DisplayObject and still had the same error returned for both rotationX and rotationY.
 
var imageC:Sprite = new Sprite();var imageD:Sprite = new Sprite();
.
.
.
imageC.rotationY = 0;
 
This is the error:
 
Scene 1, Layer 'Layer 1', Frame 1, Line 149 1119: Access of possibly undefined property rotationY through a reference with static type flash.display:Sprite.

View 1 Replies

ActionScript 3.0 :: RotationY Property Same - Items Not Rotating Similarly

Apr 24, 2011

As you can see from the image, even if rotationY property of all 4 items are the same, they do not rotate at same amount. Each image are inside of a container and containers are added to stage. Why is it the case?

View 2 Replies

ActionScript 3.0 :: Flash - RotationY Of TextField Makes It Blurry

Jul 14, 2010

I have a Movieclip on which there is a Video Player in the left and thumbnails in the right. The thumbnails are of other videos and aligned in 4x4 grid. Every thumbnail has a small description (textfield) below it. The number of thumbnails are dynamic and there may be n number of videos. So I have written a pagenation code for them, by which 16 thumbnails will be visible on each page. Now when I change one page to other, I need to rotate the thumbnails with text in Y axis and display new thumbnails and their respective text. I have embedded the font Arial and I am adding the textfields from as3. But even after rotation, the text becomes blurred. I am setting the following properties:

TextFormat:
colorsizealign
TextField:
embedFontsmultilinewordWrapautoSizeantiAliasType
Library Font:
Arial Regular (No Bitmap Text)

View 1 Replies

ActionScript 3.0 :: Access Of Possibly Undefined Property RotationY Through A Reference?

Oct 9, 2009

Every time I try and apply a rotationY (or any rotation) I get this error:Code:Access of possibly undefined property rotationY through a reference with static type lash.display:Sprite. sprite.rotationY=-10;here is the code:

[AS]
package{
import flash.display.*;

[code]......

View 3 Replies

ActionScript 3.0 :: RotationY On Textfield With Embedded Fonts Doesn't Work

Jan 18, 2010

i have a text field that I create in flash, when rotate it on the y axis with actionscript, I encounter problems, the text gets bigger and doesn't fit inside the text field, when i don't embed the fonts or use device fonts, it works fine, but I need the text to be consistent across all user computers, any ideas, i'm using cs4 and as3

View 1 Replies

ActionScript 3.0 :: 3D Rotation (rotationY) Slow As Hell On IPhone (AIR) High Definition

Jan 16, 2012

[code]It even performs ok in low resolution export;but under high resolution export the speed is SUPER SLOW!!I have tried cache as bitmap matrix,[code]Only later I found the caching don't really support 3D rotations... Is there anyway to get it perform normally under high res??

View 1 Replies

ActionScript 3.0 :: Not Performing Calculation?

Mar 17, 2012

So i think i have fully coded my calculator but it still doesn't seem to be performing the calculations correctly. I can't see where i am going wrong. If i perform a calculation let's say 6*2 it outputs NaN then i straight away + by let's say 5 it outputs NaN again. And it doesn't make the operators display only once, so if i click on '+' twice it will display twice in the display when it is meant to only display once and in one of my functions i cleared the display field so that it would replace the number's when the next operation is performed but it doesn't seem to be doing that. I have been going over the code several times but i can't seem to identify where the problem is coming from.

Actionscript Code:[code].....

I have not added the full code as it is too long, i have just added the parts which relate to each other. I am just doing everything entirely through actionscript, nothing is on stage apart from the display and answer text fields.

View 6 Replies

Actionscript 3 :: Age Calculation In Flex

Mar 3, 2010

I'm trying to calculate age in flex. I've found this previous question url...[code]but I don't understand 100% whats going on.How do I go Implementing this into my code say if the date was 12/23/1990?Also How would I go about modifying this code to calculate the age if two dates are provided instead of using the current date? eg. 12/23/1990 - 10/15/1999

View 2 Replies

ActionScript 2.0 :: Flash Calculation Bug?

Feb 16, 2011

59.99 + 10 = 69.99 is true.but if we trace it with flash as bellow trace(59.99 + 10 == 69.99)it says false.is the above condition is an exception?

View 7 Replies

ActionScript 2.0 :: Calculation Of Infinity?

Dec 28, 2002

I have a actionscript calculation that initially calculates a value of infinity. Is there a "if" statement you can perform until the calculation actually calculates a real number (0-100)?

View 14 Replies

IDE :: Dynamic 3D Distance Calculation?

Jan 14, 2009

Is there a way to calculate the distance between the origin of a movieClip at, say, (x:500, y:0, z:0) and one at, (x:500, y:0, z:50)?? And lets say the vanishing point is (0,0) and the perspective angle is 50.

I know that the eq for finding the distance between two points in 3D space is:
d = ((x1-x2)^2 +(y1-y2)^2+(z1-z2)^2)^(1/2)

the problem is I dont know x2 (the x value of MC2 (the one set at z = 50)).

[URL]

View 2 Replies

ActionScript 3.0 :: Odd Calculation Error?

Feb 9, 2011

So got a very odd result from a maths operation:

Code:
var myNumber = 6.3 + 9.1;
trace(myNumber);

[code]....

View 11 Replies







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