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
Similar Posts:
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
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
Sep 7, 2011
I have a web page that uses javascript counters to count user "active" time, meaning the time a user spends viewing this page (and not some other page). I do this by starting/stopping them using the [URL].. However, when the user clicks on a plugin inside the same page (flash, java, etc), the window loses focus and window.onblur is fired. Is there a way to tell that the user is still on my page?
View 1 Replies
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
Mar 1, 2011
there is a problem with IE browser it does not recognize object HTMLEmbedElement and not proceed for further execution . i have no choice because there is nothing to be updated in programming code
View 2 Replies
Apr 2, 2012
When I pull Illustrator elements with Outer Glow into Flash, the glow looks pretty nasty...lots of artifacts and "squares" throughout the area where the glow is.
Is there a way to preserve the high quality glow I see in Illustrator once I import those graphics into Flash?
View 4 Replies
Sep 28, 2010
I know 3D rotation is well documented on SO and many other sites, but despite reading countless explanations I still haven't figured out where I'm going wrong. My background is in art and design, not math and programming, and I'm never really certain if my angle of attack (no pun intended) is the right one. Rather than paste a patchwork of my dismal code, I'm including an image describing my problem. What I'd really like is a step-by-step worded breakdown of how to solve it. Pseudo code is useful, but I will learn more if someone will just aim me in the right direction or point out common pitfalls.
[Code]...
View 3 Replies
Jul 25, 2011
I use a flash program in my website to resize pictures before transfert, for preserve my bandwidth.
But, when i try to transfer a .png file with transparency, the resize don't maintain transparency in the .png file result. It's a problem for use it after.
[Code]...
View 1 Replies
Jun 2, 2011
I was recently tasked with replicating [URL] in HTML5 and jQuery. I'm currently struggling to do the effect where the menus slide up behind the images when an arrow is clicked (See the Menu section for the best example) and was wondering if this is actually possible in jQuery. So far I have [URL] which is sort of getting there but I'm not sure it's the best approach.
View 1 Replies
Feb 25, 2008
I was wanting to know whether it is possible to replicate this flash file (link below) using action script. By replicate i mean do more or less exactly what this does but perform a little more smoothly. Certainly i shouldnt have to go through all this on the timeline for such small results. The flash file below took me ages to do and im sure via action script it should be much quicker and easier.
View 14 Replies
Feb 26, 2009
Using AS 2.0, I'm trying to load some php into a dynamic text box in Flash via loadVars, and once I bring it it, it strips the formatting on the next. Such as link colors, bold, italics... just simple html formatting. How can I preserve that. The formatting of the text is done on an admin website.
[Code]...
View 2 Replies
Feb 22, 2011
Is there anyway we can replicate Photoshop's adjustment layer in Flash? I see that we can replicate blend like overlay. But didn't see a way to replicate Hue/Saturation adjustment layer for example.
View 2 Replies
Aug 26, 2011
I'm trying to replicate the motion of a 'mexican wave'. I am using Flash CS5, and using AS2. I've created a 'jumper' graphic and animated it in a clip so it jumps once - up then falls back to the ground. I've pulled the clip in to the main timeline and replicated a bunch of times so I have a row of 'jumpers'. I've given each instance a unique ID. Then I'm telling each clip instance to start playing, in sequence, using the following code:
var total_jumpers = 36;
var i = 0;
var jumpLag = 1000;
function do_jump(bottle) {
jumper.play();
[Code] .....
In the clip, I have put stop() in the last frame to try and stop it looping. So this works ok, but the clips seem to loop - I can't get them to stop.
View 1 Replies
Sep 5, 2011
I'm trying to replicate an smart filter from Photoshop (CS5) in AS3. Here's what I'm trying to do: I want to have a dark gray background (0x323232 to be specific) with some light, fine grained monochromatic noise on it. I've been mucking around with the perlinNoise method but it's 'too much noise'. Too much contrast. Code: bitmapData.perlinNoise(3, 3, 13, Math.random(), true, true, 7, true); Could anyone point me in the right direction?
View 2 Replies
Mar 8, 2009
navigation center left, the grey boxes.click it and the content area will flip 180.how is it possible to do such FX?is there any general methods to use perspective in flash?
- with bitmaps
- with MCs
View 2 Replies
Jun 1, 2011
I would like to have a MovieClip that has a bit of depth. I can't use rotationX, rotationY or rotationZ because I have to use Flash CS3. The first image is what I have now, a flat movieclip. The second is what I should have.
I already tried using a matrix, but that didn't work. I posed a question about it, and there somebody sugested that I should use a 3D engine to get the result I want.
[Code]...
View 1 Replies
Jul 30, 2011
Okay, there are a few things I want to know how to draw in one-point perspective: a toilet, a shower, a bath; basically I want to know how to draw everything in a bathroom.
View 0 Replies
Jan 31, 2009
I've noticed there is something in AS3 that allows "shearing or skewing" of an object, but I was wondering if it's possible to do the equivalent of what Photoshop refers to as "transform>>perspective"
View 3 Replies
Dec 30, 2009
I'm trying to get the depths of all the blocks to be at the correct levels at the correct times so that the 3d effect is maintained. I've tried many things, but have had little success. All the instances of the blocks are stored in an array, but since it's adding them in accordance with when they're added to the stage, it doesn't help me locate them to swap depths. Is there a way to arrange them by location on the board?
View 4 Replies
Jul 30, 2010
The windows are in a mess now, is there a button/menu that can reset the view so that it looks like what it's like originally?
View 1 Replies
May 2, 2010
The following is entirely a math question. As we know, PerspectiveProjection delivers perspective transformations in 3D represented by the interdependent values of fieldOfView and focalLength according to the following formula:
focalLength = stageWidth/2 * (cos(fieldOfView/2) / sin(fieldOfView/2)
Q: How to get the visible on-screen size of the DisplayObject (Cube on the above-linked image) to which PerspectiveProjection has been applied? A more thorough description and illustrative code on the issue in ActionScript 3 lacks functionality for visible bounds of DisplayObject.
View 1 Replies
Feb 17, 2011
I'm in the planning and learning stages of building a facebook game. For the past year my foremost question has been, "Flash or HTML5?". Rather than try to decide the answer to that, I thought I would give the markets for both some more time to mature and learn how to design the game and how to manage the server element.
Over the last year I've devoured thousands of pages of text concerning game development and business development, along with getting a solid footing in AS3, python, php, C# and javascript. So, I'm most interested in picking a system that is best for the job rather than, for example, starting off assuming the game logic will be in python because that's what I enjoy most.
The game is at its core a strategy game and I plan to use many mobile phones extensively in addition to the standard facebook "invite all your friends" features. The graphics won't be flashy and will in most places be rather flat because of the thematic elements, rather than 3d isometric like farmville or other flash facebook games.
So from a technological perspective HTML5 doesn't have any real advantage that I can see over flash, and neither does flash have any real advantage over HTML5. If you see that one has a clear advantage over the other then I would be happy to hear that in your comments.
I have five primary questions that I need your opinion on:
1) Which platform makes better sense for building a facebook game considering the future market trends?
2) Which platform has better inherent elements to help prevent cheating? (like flash being compiled into a .swf vs javascript being in plain text)
3) Which platform would be most attractive to the best game development talent for future hires?
4) Which platform is easiest to take technology from one game and use it for other future games? (like developing isometric graphics in flash)
5) Which platform is easiest to develop with a team?
View 3 Replies
Jul 30, 2011
I didn't know where this should go; I thought this was the best place. In Actionscript 2.0 I'm trying to draw the shelf of a closet (wall-to-wall) but I don't know how to.
View 1 Replies
May 29, 2003
I am trying to create a starfield effect. I have gone through the tutorials here and elsewhere and come so far. I am attaching the fla file along with the code. The motion as you can see is jerky. Cant figure out what am i doing wrong. Another thing. I am trying to load this swf into a main movie using the following script:
[Code]...
View 4 Replies
Nov 6, 2010
I could go about drawing buildings with 3d perspective height, like in the original [url]...
I've tried using beginBitmapFill() and drawing the polygons but the texture doesn't look right because it lacks the correct depth.
View 1 Replies
Aug 22, 2006
I'm attempting to create a dynamic perspective shadow system in Flash 9 (AS 3) that would have the following constructor:
ActionScript Code:
public function PShadow(mcClipToShadow:MovieClip, nAngle:Number = 45, nDistance:Number = 20, nAlpha:Number = 90, nBlur:Number = 10, nXOffset:Number = 0, nYOffset:Number = 0)
{
//do stuff
}
The function would duplicate the mcClipToShadow MovieClip to use as the base shadow, apply a 100% black tint, set the alpha to nAlpha, and apply a blur filter with Blur X = Blur Y = nBlur. Then a transformation Matrix would be applied that would skew the shadow sprite so that it was cast in the nAngle direction with length nDistance.
The only part that I'm having trouble with is solving the math for the Matrix. I've played a lot with the swf's in your tutorial to better understand how the matrix manipulates things, but I'm still having troubles doing the math properly. My goal is to simply plugin the variables from the constructor into the Matrix constructor and the proper shadow will result.
View 1 Replies
Feb 19, 2012
I need a movie clip that will stay in the same place on the x axis, but will scroll up and down with the page viewer on a website. staying in view.
View 1 Replies
Aug 31, 2010
i am moving from AS3 and Java to Expression Blend/WPF, but cant seem to figure out how to replicate EnterFrame event in C#, is there a update() or frameUpdate() function.
View 2 Replies
Mar 31, 2011
I'm loading an xml file in AS3/Flex for an AIR app. When I save it, the indenting looks pretty, however all the tabs from the original file, are now spaces. Can I save to that the tabs remain?
open file code:
var file:File = event.target as File;
var fileStream:FileStream = new FileStream();
fileStream.open( file, FileMode.READ );
[code]....
View 1 Replies