Home » Archive

Articles in the Flash Category

Code Samples, Flash, Tutorials »

[21 Aug 2008 | View Comments | 1,716 views]

Here’s a simple scene that renders a Papervision3d scene within a container. There are no 3d elements added, but this is as simple as it gets.

import org.papervision3d.cameras.*;
import org.papervision3d.objects.*;
import org.papervision3d.materials.*;
import org.papervision3d.scenes.*;

var container:Sprite = new Sprite();
addChild(container);
container.x = stage.stageWidth * 0.5;
container.y = stage.stageHeight * 0.5;

var scene:Scene3D = new Scene3D(container);
var camera:Camera3D = new Camera3D();
camera.zoom = 11;

addEventListener(Event.ENTER_FRAME, loop);

function loop(e:Event):void
{
scene.renderCamera(camera);
}

If you’re interested in how this can be improved, check out the next post with a more elaborate Papervision scene.

Code Samples, Flash »

[21 Aug 2008 | View Comments | 1,102 views]

Re-usable class created by brianConnatser that will set up an external XML feed to use E4X, datagrids, and much more.
Check out some of the code