Using A Skybox with Up and Down Function

Software: Away3D 4.x

Selly, Newbie
Posted: 25 November 2014 06:20 AM   Total Posts: 3

Hai, i want to ask how to make Up and Down function?
This tutorial can make move left and right (This is Source Code)
Anyone can help me find out for this solution?
Thanks a lot


GrokDD, Newbie
Posted: 26 November 2014 08:52 AM   Total Posts: 28   [ # 1 ]

Yeah, all the magic is in the onEnterFrame function.
The source code you referenced uses:

private function _onEnterFrame(e:Event):void
.rotationX += 2;
_torus.rotationY += 1; = new Vector3D(); += 0.5*(stage.mouseX-stage.stageWidth/2)/800;;

They set the camera back at the origin (0,0,0) of the 3D universe. Then rotate the camera a calculated amount depending on the X position of the cursor on the screen. Finally moving the camera “back” a designated distance. It all happens before the frame is seen on screen.

So to answer your question, try adding the line: += 0.5*(stage.mouseY-stage.stageHeight/2)/800

I wrote a tutorial explaining what is happening here.
It is for Away TypeScript, but the code is very similar and the concept is exactly the same.


Selly, Newbie
Posted: 28 November 2014 10:56 AM   Total Posts: 3   [ # 2 ]

thanks a lot :D


Selly, Newbie
Posted: 28 November 2014 11:11 AM   Total Posts: 3   [ # 3 ]

i want to ask something again. I want to run the skybox,swf file in another flash file but there’s something error. “Texture not could be found”. Anyone can help me, please?
thanks smile



Away3D Forum

Member Login