We have had forums!
I’ve set up a Papervision 3d forum at http://papervision2.com/forum/
Hopefully these forums will help everyone to solve common problems that they’re having with Papervision. I’m going to fill them with some problems which we’ve resolved in the past so they’re all in one place.
I’ve set up Help, General Chat, Suggestions and Examples forums. If you can think of anything else that the forum needs then make a thread in the suggestions forum and I’ll get round to it.
Hope you like it!
-Luke


What’s up with the forum? It’s been offline now for a few days.
Guys I Need Help IN something Now I Created A Simillar Panorama Viewer But For Cylinderical Images . . Anyway I Wanna Know How to Use The Final SWF ?
I’m Using Flash Develop & sometimes I’m Using Flex . . Both Produce .swf File That Doesn’t Work in My Website . .
i’ll give you an Example of what i’m talking about . .
i’m using the following .. . ……………….. and this SWF Displays Nothing . .
i don’t know if the problem is from my side when building the Project or what is it . . i can’t See Eventhe Wire-Framed Cylinder , I Just See A Very Blank SWF . .
i’m using http://localhost/realestate/new_panorama.html to view the flash ..
my code is as follows :
BTW: it’s Here for free for anyone to use / modify it . . .
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
import org.papervision3d.objects.primitives.Cylinder;
import org.papervision3d.render.BasicRenderEngine;
import org.papervision3d.scenes.Scene3D;
import org.papervision3d.view.Viewport3D;
import org.papervision3d.cameras.*;
import org.papervision3d.materials.*;
import org.papervision3d.core.math.*;
import flash.text.*;
public class Main extends Sprite
{
private var viewport:Viewport3D;
private var scene:Scene3D;
private var camera:FreeCamera3D;
private var renderer:BasicRenderEngine;
private var pressed:Boolean;
private var cyl:Cylinder;
private var expected_rotation:Number = 0;
private var max_angle:Number = 0;
private var min_zoom:Number = 3,max_zoom:Number = 5;
private var new_material:BitmapFileMaterial;
private var sho:TextField;
private var load_image:String = “”;
public function Main()
{
init();
}
private function init():void
{
initPapervision();
initObjects();
initListeners();
}
private function initPapervision():void
{
viewport = new Viewport3D( 500,300, false, true );
addChild( viewport );
scene = new Scene3D();
camera = new FreeCamera3D();
renderer = new BasicRenderEngine();
}
private function initObjects():void
{
if (typeof root.loaderInfo.parameters["image"]!=”undefined”)
{
load_image = root.loaderInfo.parameters["image"];
}else
{
load_image = “Saloon.jpg”;
}
new_material = new BitmapFileMaterial(load_image);
new_material.doubleSided = true;
new_material.tiled = true;
new_material.smooth = true;
cyl = new Cylinder(new_material,240, 350, 20, 10, -1, false, false);
scene.addChild(cyl);
cyl.x = 0; cyl.y = 0; cyl.z = 0;
camera.x = 0; camera.y = 0; camera.z = 0;
camera.zoom = 3;
}
private function initListeners():void
{
addEventListener( Event.ENTER_FRAME, onEnterFrame );
this.addEventListener( MouseEvent.MOUSE_DOWN, onPress);
this.addEventListener( MouseEvent.MOUSE_UP, onRelease);
this.addEventListener( MouseEvent.MOUSE_WHEEL, onZoom );
}
private function onPress( evt:MouseEvent):void
{
pressed = true;
addEventListener( Event.ENTER_FRAME, onEnterFrame );
}
private function onRelease( evt:MouseEvent):void
{
pressed = false;
removeEventListener( Event.ENTER_FRAME, onEnterFrame );
}
private function onZoom( evt:MouseEvent):void
{
if (evt.delta>0)
{
if(camera.zoom min_zoom){
camera.zoom -= 0.1;
}
}
onEnterFrame(evt);
renderer.renderScene( scene, camera, viewport );
}
private function onEnterFrame( e:Event ):void
{
if (pressed == true)
{
camera.rotationY += ( 6 * ( this.mouseX – (stage.width/2) ) / (stage.width / 2) )
}
if (camera.zoom >= min_zoom)
{
expected_rotation = -1 * ( 3 * ( this.mouseY – (stage.height/2) ) / (stage.height / 2) );
max_angle = 13.6 * ((camera.zoom-min_zoom)/2) ;
if ((camera.rotationX+expected_rotation) > max_angle)
{
camera.rotationX = max_angle;
}
else if ((camera.rotationX+expected_rotation) < (-1 * max_angle) )
{
camera.rotationX = -1*max_angle;
}
else
{
camera.rotationX += expected_rotation;
}
}
else {
max_angle = 0;
}
renderer.renderScene( scene, camera, viewport );
}
}
}
werd, what’s up with the forums?
I checked that forum papervision2d.com forum is not working. So i am posting my query here.
I want to rotate my camera around a node called nodeX. I want to follow the approach that i make an invisible node ( called nodeY) around nodeX and add my camera as a child of nodeY and now rotate nodeY by dowing nodeY.yaw().
But doing this doesnt move my camera.. iam using FreeCamera3D and nodeY is a DisplayObject3D. Iam not able to figure out why it is not moving.
If i make another DisplayObject3D as child of nodeY .. then it does move when i rotate nodeY … but it doesnt happen with the camera.
Please help.
Thanks
Can I make an input field with Papervision?