Flash :: Quaternion Cube Rotation Animation

Jan 14, 2011

I created this Rubiks Cube with Papervison3D. With some resources I created a Cube with 27 minicubes inside (3*3*3 = 27). Rotating the Rubiks Cube on mouse move is already done. (I do not rotate the camera.) All the behavior of a Rubiks Cube is in there already. But I'm a bit stuck in the final phase.

When I play with it like I would do with a normal Rubiks Cube it's working ok, besides I know that the default Euler rotation values aren't reliable anymore after a while. What I need is to rotate the Rubiks Cube to the selected side and after that rotate the Rubiks Cube over the z-axis so the minicube face faces up. I prefer to animate it with TweenMax but I'm really stuck since I need quaternion rotations.

I know the selected face of the Rubiks Cube itself. I know the Euler rotation of the Rubiks Cube using Matrix3D.matrix2euler(_rubiksCube.transform); What I need is to rotate it to the selected face for instance when the current rotation is x: -20, y: 35, z: 10 and I select the back face of the rubiksCube it must rotate to x:0, y: 180, z: 0.

What I need is to change this to Quaternion values and rotate the Rubiks Cube to the new Quaternion value. After that it must rotate the Rubiks Cube over it's z axis to face the selected minicube face up. This is the code I use when dragging/ rotating the Rubiks Cube

[Code]....

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Cube Rotation In Flash - Draw Own Image

Dec 13, 2002

i need to do something like the swf file am attaching instead of the cube revolving... i need to draw my own image. how to bring this effect in flash. as if now, i have created the cube rotatoin in swift 3d and have exported it as a swf file. also can we draw our own images in swift 3d? (instead of the readymade cube?)

View 1 Replies

Javascript :: Replicate Flash Cube Rotation In CSS: Preserve Correct Perspective?

Mar 21, 2012

I am converting a Flash Web App to a Javascript(HTML and CSS) Web App. I have a cube rotation animation working but I have a problem with the perspective.My Problem: I am not sure which CSS attribute I should use to replicate the Flash versions perspective(please see the 2 images below). The 2 below images where taken while the cube rotation was occuring and you can see the difference in the perspective(the 2nd image is too wide and should look like the first). You can see a working example here(Note it only works onThe first image was taken from the flash application and displays the CORRECT perspective(that I am trying to achieve in CSS).The 2nd image is taken from my CSS, Javascript and HTML web app and the cube rotates with the INCORRECT perspective. What CSS attribute do I change in order to achieve the above images cube perspective?

View 1 Replies

Actionscript 3.0 :: Papervision / Cube / Rotation And Easing

Dec 13, 2008

I'm at the moment trying to recreate a menu system that I found on URL... as you can see, the menu you get after you've choosen a language is a 3d menu rotating so its always looking at the cursor, but as you will notice, the motion has a little bit of easing to it, which I'm currently trying to recreate using the cube you make with the "Papervision3D 2.0 Interactive Cube" from GotoAndLearn();URL...and here is the code behind that drives the rotation:URL...Now, my problem is that I'm having a hard time figuring out how to create a tween effect on his, resulting in a bit out of sync rotation that slowly stops instead of just following my pointer in an instant.

View 12 Replies

Professional :: Animation Gets Stuck On Rotation In Flash CS4

Apr 15, 2010

I have 1656x1332 px 30fps movie clip sliding or rotating on click event inside of 850x550 px stage. For some reason the clip gets stuck on rotation sometimes, even though the whole file is only 46 KB. Moreover, depending on browser, the rotating part can fly completely off the stage and the only way to get it back is to refresh.[code]

View 4 Replies

ActionScript 2.0 :: Trigger An Animation To View The Different Sides Of The Cube

May 21, 2011

I have a cube and the buttons are meant to trigger an animation to view the different sides of the cube. For optimising and swf hosting sake I want to use one animation on the frames of the timeline but for multiple buttons. e.g. button 1 goes to the start of the animation, then at the end, the action goes to the frame 2. if button 2 was pressed to go to the start of the same animation then at the end, the action goes to frame 3 etc. Does anyone have any thoughts on how this should be done?

View 2 Replies

ActionScript 2.0 :: Create The Animation/movement Of A Cube Flipping/rotating Vertically?

Oct 18, 2004

Is there an actionscript I can insert to create the animation/movement of a cube flipping/rotating vertically?

View 4 Replies

Flash :: Export Animation Data - X And Y Coordinates And Rotation Values For Individual Images In A Sequence?

Mar 22, 2011

From Pro Adobe flash can I export an animation's data? like the x and y coordinates and rotation values for individual images in a sequence

View 1 Replies

Professional :: Smooth And Continuous Rotation Of Animation

Nov 8, 2010

im quite new to flash, and im just about to create an animation which will rotate continuously but my problem is that each time it ends its loop it pauses for a bit then loops again,

View 6 Replies

Professional :: Can't The 3D Rotation Animation Doesn't Work On Other PCs?

Feb 16, 2011

I have created a Buttons Menu and then using Flash CS4 AS3 3D Rotation Tool Just added tilting effect using manual tweening and added the following code:

[Code]...

View 2 Replies

ActionScript 3.0 :: Why Can't 3D Rotation Animation Doesn't Work On Other PCs

Feb 15, 2011

I have created a Buttons Menu and then using Flash CS4 AS3 3D Rotation Tool Just added tilting effect using manual tweening and added the following code:

Code:
ButtonPanelTilt_mc.addEventListener(MouseEvent.ROLL_OVER, rollOverMenu);
function rollOverMenu(event:MouseEvent):void {
ButtonPanelTilt_mc.gotoAndPlay("Tilt");

[Code]....

The .SWF File is working pretty well on my PC but on other PCs, when I move my mouse over the buttons menu, it disappears.

View 1 Replies

ActionScript 3.0 :: Stop The Rotation Animation On An IPad

Sep 9, 2011

Does anyone know how to stop the rotation animation on an iPad when I set the stageOrientation property?I would rather it be instant instead of this rotation thing that is going on when I call stage.setOrientation

View 1 Replies

ActionScript 3.0 :: 3D Rotation Animation Loaded From Other SWF File Not Playing

Jul 7, 2009

I have created a flash cs4 file > I did some animation using 3d rotation tool > then im trying to load this file from another swf > and surprisingly I cant see any animation? I am loading the file using the given below code:

var Xpos:Number=0;
var Ypos:Number=0;
var swf:MovieClip;
var loader:Loader=new Loader();
var defaultSWF:URLRequest=new URLRequest("test-2.swf");
loader.load(defaultSWF);
loader.x=Xpos;
loader.y=Ypos;
addChild(loader);

In the above example "test2.swf" contains some animation using 3d rotation tool. Why its not showing any animation on load?

View 2 Replies

ActionScript 3.0 :: Create A Dynamic Text Rotation With Animation?

Jul 7, 2011

So I'm working on a project where I'm building a flash loop to play on a display in an office lobby. I'm making it so there are static elements in the animation as well as dynamic elements. I'm thinking it will pull in all the data from an XML document - I've got that worked out. Here's where I'm stuck.

I know how to use Actionscript to dynamically create a text component, and I'm using TweenLite to animate that text component -- but how would I go about setting up a class that looks at the total number of dynamic screens that need to be created and animate all the text in a sequential order...one slide at a time.

View 0 Replies

ActionScript 1/2 :: Create An Animation Involving A Big Fast Zoom With A Little Rotation And Animating It On The Timeline?

Jun 19, 2009

I have to create an animation involving a big fast zoom with a little rotation and animating it on the timeline just doesn't cut it.I start with state 1 (see attached file state11.jpg) where there is an animation and then I want a fast smooth zoom until I reach State 2 (see attached file state2.jpg). In the first state the "map" occupies the entire screen, but when it reaches state 2 the map is inside a mask and the other elements will start appearing.how to create this zoom smoothly with actionscript? I am really lost here and I know somethings about actionscript but I just cannot do this and my timing is today...

Attachments:
state2.jpg
(149.0 K)
state11.jpg
(121.2 K)

View 2 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

Actionscript 3 :: Augmented Reality Flartoolkit Rotation - Trace The Rotation Of The Marker

Mar 23, 2011

I'm trying to do some augmented reality projects with flartoolkit . I can now put simple 3d objects on my marker and it works fine , but I wanna give my project some events that the user can interact with. I'm trying to trace the rotation of the marker. there's a container:DisplayObject3D which my application uses to add the 3d objects , I traced this :"trace(container.rotationZ)" but it's just returning 0 . I studied another AR application's source code and it was using the rotation of it's container object without problem .and I think I should mention that I'm using the exercise file of seb lee delisle papervision3d course from [URL]. anyone has any experience with flartoolkit? the main functions of my my code is as below:

[Code]...

View 1 Replies

Flash :: Fix Rotations In A Rubik's Cube?

May 16, 2010

I'm trying to create a Rubik's Cube in Flash & Papervision and i'm really stuck here. I'm up to the point where i can rotate any plane of cubes once, but after that...it's messed up because all local coordinate systems are messy.I dont really know where to go from here, can anybody give any advice on what do do? I'm not looking for 'read about transformation matrices', i know i should (and i am doing that), but i'm not really sure what to look for.My idea is that, after each rotation, i should fix each coordinate system of each cube again, but i have no idea how. Any hints on what i want to achieve (in words)

View 3 Replies

Flash :: Nothing Happens When Try To Render A Cube Using Away3D?

Aug 11, 2011

when I try to render a cube using Away3D + Molehill, I only get a white default screen, I followed the instructions here: hhe only thing I did not do, was the part that talks about the patch, cuz If I do that I get errors like when I try to import the Sprite class, for example.Im using FB 4.5.!

This is my code:
package
{

[code].....

View 1 Replies

ActionScript 3.0 :: 3D Rotation Of Nested Movieclips, Separate Of Parent Rotation?

Aug 11, 2010

Is it possible to have the child movieclip rotate separate of the  rotation  properties assigned to the parent? so ultimately giving the  child  element it's own axis?I've customized Lee Brimelows (gotoandlearn.com) 3D carousel to spin  on  the x axis to make it a vertical carousel. I've also rotated that by 45 degrees on the y axis to see all the items, and wrote a snippet of   code to hide the left portion of the carousel. The entire  carousel is contained within the 'container' movieclip, and  inside of  that are my carousel items (as seen below), with the larger  item being  the item in focus.

On rollover of the item in focus, I want to rotate it so it faces the   viewer (as seen below),basically removing the 45 degree rotation   applied to the container.The problem i'm running into is when you rotate the container (changing   the rotationX of the container), the axis basically rotates with it, so   when i rollover the next item 'in focus', the following happens..(in  the  example where it appears how it want it to, the carousel is at a   rotationX of 0, so it works fine)

View 2 Replies

Moving Cube With Arrow Keys In Flash CS4

Sep 13, 2009

I just made a new Flash project. It lets you move a Cube, with the arrow keys on the keyboard.
Code:
function hearKey(yourEvent:KeyboardEvent):void{
if (yourEvent.keyCode==Keyboard.RIGHT){
cube_mc.x+=5 };
if (yourEvent.keyCode==Keyboard.LEFT){ 
[Code] .....

It works perfectly fine, except for example: I press down the down key. It moves down (good so far). I keep pressing the down key down and also press the left key down. Now it moves left(not so good, I want it to move both left and down, how do I do that?) Now I release the left key but am still on the down key. Nothing happens....(I want it to then continue going down).

View 1 Replies

Actionscript 3 :: Flash - Draw Static 3D Cube

Mar 21, 2012

I'm trying to draw a 10x10 grid with Actionscript 3 with a vanishing point behind - so each square looks like it's coming towards the screen (each from its own relative perspective). I've found many tutorials for 3D perspective cubes, but they all revolve around movement. Surely static shapes must be easier, Is there some way I can use PerspectiveProjection() in my case where it doesn't involve movement? It looks to be exactly what I want, yet seems reliant on movement. Or are there any other methods for 3D perspective object creation? I'd prefer to use internal AS3 functions if possible. The closest I've got was this tutorial, which I could likely apply to my situation, but I want to make sure there's not an easier/cleaner way before attempting it.

View 1 Replies

ActionScript 3.0 :: Flash Image Cube Rotator From Xml

Oct 5, 2011

I am new in actionscript 3.I want to make a rotating vertically cube with images from an xml.Cube will rotate to a side,stay for a while then rotate to the next side and show me the image for a while too and continue.In each side I want to pass a url so when I click the side-image to direct me to a website.

View 1 Replies

ActionScript 1/2 :: Inconsistent Rotation - 270 Degrees Of Rotation Disappear?

Apr 21, 2009

Program A has a cannon that aims to line up with where-ever the mouse is pointing, in 360 degrees, and fires when the mouse is is clicked. Program B has an eye instead of a cannon that should in theory do similar functions when the capslock key is toggled, but instead only has a 90 degree range of motion from the Right of the eye toward the bottom (quadrant 4 only). Where did the ther 270 degrees of rotation disappear to?

[Code]...

View 4 Replies

ActionScript 2.0 :: Create A 3d Rotation Much Like The Widely Used Carousel Only The Rotation?

Aug 11, 2006

i.m trying to create a 3d rotation much like the widely used carousel only the rotation i desire consist of four upright(90 degrees) movieclips resting on a slanted, 30 degree plane which rotate onEnterFrame or following a tween on a oval like path - then pause for a given number of seconds at the four movieclips positions equal in distance on the plane

function around() {
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = this._y /(centerY+radiusY);

[code]....

View 7 Replies

IDE :: Z - Rotation X And Rotation Y Missing In Motion Editor Panel

Feb 23, 2009

Why isn't there the Z, rotation X and rotation Y fields in my motion editor panel?

View 1 Replies

Flash :: Use Text As Texture On Cube Inside Papervision3d?

Jan 19, 2010

What is the best technique to apply anti-aliased text as texture on cube using papervision3d?

make dynamic textfield, convert it to moviematerial then apply it to the faces of cube. Design a bitmap using any picture editor and make a bitmapFileMaterial to apply on faces of cube.

View 1 Replies

Flash :: Apply Bend On A Cube Using DMod And Away3D?

May 10, 2011

I am having some problems with the away3D library. I want to apply a bend to a cube using AS3DMod, but i can't seem to get it working. My cubes kind of get mutilated when i want to bend them :p they bend to all directions and i can't seem to find a pattern in the bending.

[Code]...

View 1 Replies

Flash :: Apply Texture To Each Side Of Cube Independently?

Dec 31, 2011

Using Away3D, I've successfully displayed a cube. So far, if I want to display a texture on each side of the cube independently (different textures on each side), I'd have to put them all in one texture, kind of like a sprite map. Is there a way I can do this so I can apply a different bitmap to each side of the cube? Here's my code so far:

[Embed(source = "texture.png")] private static var _texture:Class;
var texture:Bitmap = new _texture();
cube = new Cube(new BitmapMaterial(texture.bitmapData),240,240,240);
cube.material.smooth = true;
cube.material.mipmap = (texture.width == texture.height);

View 1 Replies

ActionScript 2.0 :: Develop A Flash Cube That Has Different Images On Each Face As Well As Individual Links For Each?

Feb 27, 2007

I've been trying to develop a Flash Cube that has different images on each face as well as individual links for each, but I'm having trouble coding it - I can either get it with images and one link per cube, or no images and individual links!!(I've seen this elsewhere) I'd like it to freeze its rotation when you hover over each face as well.

View 3 Replies







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