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
Similar Posts:
May 2, 2010
I'm following the tutorial "PAPERVISION3D Basics Tutorial". I'm developing on mac and i've setup the global class path in the ActionScript 3.0 settings in the preferences panel like this:
[Code]...
View 7 Replies
May 2, 2010
I'm playing around with papervision and i've followed this tutorial:[URL]..I wrote the code as the tutorial but i have some errors.
[Code]...
I've flash cs4 and i've downloaded papervision 2. I followed the tutorial but i have this errors...why?
View 2 Replies
Jul 6, 2010
i'm trying to use for the first time papervision.I'm able to add a cube to the scene. now i wanna add interaction at the cube. i try with
Code:
InteractiveScene3DEvent.OBJECT_PRESS
but it doesn't do anything.another thing that i've not understand is that if delete this instruction:
Code:
renderer.renderScene(scene, camera, viewport);
i don't see anything.This is the code:
Code:
import org.papervision3d.view.Viewport3D;
import org.papervision3d.cameras.*;
import org.papervision3d.scenes.Scene3D;[code]......
View 3 Replies
Mar 29, 2011
I coded my Papervision 3D .as file. I am getting errors for the section of code that creates variables for the materials that are images.
package {
import flash.events.Event;
import org.papervision3d.materials.ColorMaterial;
[code].....
View 5 Replies
Apr 14, 2011
How can I position a bit of text (or text as image) next to a cube?
View 1 Replies
Feb 26, 2009
package{
import flash.display.Sprite;
import flash.events.Event;
[code].....
View 1 Replies
Apr 13, 2011
I am testing with scaling a cube, like so
Code:
private function growCube():void {
TweenLite.to(cube3, 2, {scaleX:1.5 , scaleY:1.5, scaleZ:1.5} );
[code].....
View 1 Replies
Aug 31, 2008
I have successfully implemented the INTERACTIVE 3D Cube, but I can't seem to figure out how to create a rollover function properly, so that once the user rollovers a face, a title for the face fades in and when the user rolls out, the title fades out. I have done it by placing 6 movieclips on the stage and giving each face a rollover and rollover event, but once I rollover a face the title flickers.
View 3 Replies
Mar 29, 2008
change a cube's materialList at runtime in Papervision 3d?
I have a cube already drawn up with two different images on the front and back. When it's clicked, I want to change the image texture on the back and then spin it to show the recently loaded image's side. Spinning's fine, I'm just unsure how to change the cube's materialist.
View 14 Replies
Jan 21, 2010
currently I'm working on a tag-driven interactive image cube. It's almost done, but one thing doesn't work. I can't load my images onto the cube.
I'll give you the code:
PHP Code:
var externalXML:XML;
var picList:XMLList;
var bilder:Array = new Array();
[Code].....
View 1 Replies
Oct 21, 2010
I have a cube with a material on the front face. I'm trying to create a magnifying glass in 2D for the 3D cube. Can anyone offer a suggestion for how to achieve this? I was thinking I might try to find the UV under the mouse in an OBJECT_OVER InteractiveScene3DEvent and somehow get the bitmap from the material, mask it, and move it around in relation to the mouse position- mimicking a magnifying effect. How to do that, I have no clue.
View 2 Replies
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
Jan 11, 2009
A longtime AS2 developer finally making the transition to AS3 and Papervision all in one big leap.Working from Lee Brimelow's awesome pv2 tutorial as a base I've been able to create a plane with a movieclip mapped to it. What I'd ideally like to do is limit the rotation of the plane to maximum of -45 to 45 degrees on the X and Y.[code]I've tried using basic conditionals to restrict p.rotationX and p.rotationY but they seem to be ignored.
View 6 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
Jun 25, 2009
I'm studying John Lindquist's example from here: [URL] I'm trying to figure out how to add restrict his matrix3d method, so the sphere has limited movement.
Code:
Select all override protected function onRenderTick(event:Event=null):void {
var currentMousePoint:Point = new Point(viewport.containerSprite.mouseX, viewport.containerSprite.mouseY);
if(isMouseDown) {
var difference:Point = currentMousePoint.subtract(previousMousePoint);
[Code] .....
View 2 Replies
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
Feb 6, 2006
how to put any easing into the rotation for the life of me...
Code:
mouseDirection = (Math.atan2(gMouse.y-_y, gMouse.x-_x)/Math.PI*180)+180;
_rotation=mouseDirection;
//Some attempts:::
[Code]....
View 1 Replies
Jan 6, 2012
I have encountered a need to build what amount to classic boardgame spinner.
1. When you click on the spinner it spins clockwise
2. There are several places where it can stop.
When the user clicks the spinner I run a method to determine where (what target) it should stop on.
How can I make the spinner spin a few times, decrease in speed (ease) then stop at a certain angle?
View 3 Replies
May 3, 2005
I have an MC which is rotating constantly controlled by an onEnterFrame action. Every frame, the MC rotates by the value of outerspinerate.
[Code]...
I noticed in the trace that the rotation values in flash are translated into the range of -180 to +180. I want the MC rotation to slow to a stop at zero _rotation value when certain events become true (it's for a preloader). I want this to happen gradually over at least half a rotation, so i'm using something like
[Code]...
View 3 Replies
Nov 15, 2002
Code:
onClipEvent(load){
_x=0;
_y=0;
speed=2;
}
onClipEvent(mouseDown){
targetx=_root._xmouse;
targety=_root._ymouse;
}
onClipEvent(enterFrame){
_x+=(targetx-_x)/speed;
_y+=(targety-_y)/speed;
}
what do i replace to use easing on rotation, if triggered from a button?
View 6 Replies
May 3, 2005
I have an MC which is rotating constantly controlled by an onEnterFrame action. Every frame, the MC rotates by the value of outerspinerate.
onClipEvent(enterFrame) {
curr_outer_rot = this._rotation;
this._rotation = curr_outer_rot + _root.dynamo.outerspinrate;
[code]......
View 3 Replies
Jul 8, 2009
[URL]I found similar tutorials, with easing and slider controls, but the pictures slide in horizontally.
View 0 Replies
Mar 11, 2010
I have a papervision camera of which turns using keyboard input, I have a radar of which I would like to orientate to direction when the camera turns.I have it all working apart from mapping my (camera) DisplayObject3D.rotationY to RadarInterface.rotation correctly.The camera (or any 3d object) works with values I'm finding hard:Clockwise: 0 to 89, 89 to 0, -0 to -89, -89 to -0 doing a complete 360.So if I were to turn 180 degrees I'd go from 0 to 90 and back down to 0 again.
View 1 Replies
Mar 24, 2011
I am trying to build a portfolio application similar to the used by Whitevoid. I am using Flex 4 and Papervision3D 2. I have everything working except for one issue. When I try to load an external SWF as a material on one of the planes, I can see any native Flex or Flash components in their correct positions, but the papervision objects are not being rendered properly. It looks like the viewport is not being set in the nested swf. I have posted my code for loading the swf below.
private function loadMovie(path:String=""):void
{
loader = new Loader();
request = new URLRequest(path);
[Code]....
Below I have posted two pictures. The first is a shot of the application running by itself. The second is the application as a MovieMaterial on a Plane. You can see how the button created as a spark object in the mxml stays in the correct position, but papervision sphere (which is rotating) is in the wrong location.
View 1 Replies
Feb 25, 2011
im trying to create this custom menu a bit more efficiently. As written, it operates fine glitch free. However, id like to incorporate some easing into the movement of each movie clip.
[code]...
how to incorporate tween classes and then easing?
View 2 Replies
Jan 15, 2009
I've built a code to cyclically move a scene on the bottom of my stage; I've done this to make a slowing-and-stop-easing effect at anytime the command will arrive. The entire scene mc is _x long something like 6000 px. The whole code goes in this way:
1) importing on the stage (with attachMovie) a mc with this code inside:
onClipEvent(enterFrame) {
_parent._parent.fondo_mc._x -= countermovement;
if (_parent._parent.fondo_mc._x <= -5800) {[code].....
The code goes right, but I need to improve it.Now there is just a variable, I tought to use two vars to implement the whole code in a setInterval, but maybe it's unuseful, and actually I can't use it in the right way.
Second issue: actually when slowAndStop function is called the scene slow too fast, if I take it to 15 it slow better but the scene is running too fast...
The best would be that the scene slow down and stop following: A) a temporal variable (and I can try to implement it with setInterval, that for istance is a cycle)
B) an indipendent moving variable, so that on one side I set the speed, on the other side I set the slow-and-stop in a matter of time with countermovement.I also tried to use a second variable:
var counter:Number = 15;
// set the _x increment
var countermovement:Number = counter/2;
but the scene slow and goes backward a bit
View 1 Replies
Jan 12, 2009
I'm familiar with how to ease something in using motion math. Easing out would not be that bad either. But how would I script something easing in half way, then easing out the second half? It would start slow, gradually move faster, then slow to a stop at the end. - almost like a sine wave I guess?
View 1 Replies
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
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