Check out the Apollo Camp swag!
Free copy of Flex Builder, Apollo bits, O’Reilly pocket guide to Apollo, Lynda.com disc on Apollo, T-Shirt, sticker, Red Bull, etc…

Thanks Adobe!
Lee
Twitter viewer using Papervision3D
I just got on the Twitter bandwagon and wanted to whip up something. The example below uses Papervision3D to display my last 20 Twitter entries. You just click on them to cycle through them. I tried using the actual Twitter AS3 library but I kept getting compile errors for some reason. Just click on the image below to check it out.
Lee
3D Sound Visualizer Using Papervision3D
I’ve put together a couple of examples using the new audio capabilities of Actionscript 3 combined with the Papervision3D engine. I am creating a 3D carousel of cube primitives and am setting their scaleY values according to the frequency spectrum that I get back from the MP3 file. The first example shows the cubes in wireframe mode so you can see what is happening. The second example uses a bitmap texture to create a cool effect that I think matches the music really well. The code for the first example is below as well. Just click on the images to see the examples and also make sure that you Flash Player 9.
[as]import org.papervision3d.scenes.*;
import org.papervision3d.cameras.*;
import org.papervision3d.objects.*;
import org.papervision3d.materials.*;
var so:Sound = new Sound();
var sc:SoundChannel;
var ba:ByteArray = new ByteArray();
var array:Array;
so.load(new URLRequest(“amon4.mp3″));
sc = so.play(0,1000);
var sp:Sprite = new Sprite();
this.addChild(sp);
sp.x = 320;
sp.y = 240;
var radius:int = 2000;
var s:MovieScene3D = new MovieScene3D(sp);
var cam:Camera3D = new Camera3D();
var pl:Plane = new Plane();
pl.visible = false;
s.addChild(pl);
cam.target = pl;
cam.z = -3500;
var ang:Number = 360/15;
for(var i:int=0; i<15; i++)
{
var bam:WireframeMaterial = new WireframeMaterial(0xFFFFFF*Math.random());
bam.oneSide = false;
var p:Cube = new Cube(bam);
p.name = “i”+i;
p.scaleY = 5;
s.addChild(p);
p.z = Math.sin((ang*i)*Math.PI/180) * radius;
p.x = Math.cos((ang*i)*Math.PI/180) * radius;
}
this.addEventListener(Event.ENTER_FRAME, render);
var yOff:Number = 0;
var angleZ:Number = 0;
var a:Number = 0;
function render(e:Event)
{
SoundMixer.computeSpectrum(ba,true,0);
for(var i=0; i < 256; i=i+8)
{
a = ba.readFloat()*10;
if(Math.round(i/8)<15) s.getChildByName(“i”+ Math.round(i/8).toString()).scaleY = (a/15)*6;
}
cam.y = (this.mouseY – 240)*8;
angleZ += (this.mouseX – 320)*0.0001;
cam.z = Math.sin(angleZ) * 3000;
cam.x = Math.cos(angleZ) * 3000;
s.renderCamera(cam);
}
s.renderCamera(cam);[/as]
Lee
North Face Demo Using Papervision3D!
After reading Mike Downey’s post yesterday and checking out the 3D video carousel, I decided that this would be a good example to create to help me learn Papervision3D. The API couldn’t be easier to use and if you use the AS3 version it is lightening fast! Click on the image below to see the example. I embedded the FLV files so that there wouldn’t be buffering issues. It’s around 6 megs so just give it a chance to load. I’m so excited about Papervision3D! The AS3 is also shown below. Flash 9 player required!
[as]import org.papervision3d.scenes.*;
import org.papervision3d.cameras.*;
import org.papervision3d.objects.*;
import org.papervision3d.materials.*;
var sp:Sprite = new Sprite();
this.addChild(sp);
sp.x = 320;
sp.y = 200;
var radius:int = 800;
var s:Scene3D = new Scene3D(sp);
var cam:Camera3D = new Camera3D();
cam.z = -150;
var center:Plane = new Plane();
s.addChild(center);
center.visible = false;
var bmd:BitmapData = new BitmapData(320, 240);
var bmd2:BitmapData = new BitmapData(320, 240);
var bmd3:BitmapData = new BitmapData(320, 240);
var bmd4:BitmapData = new BitmapData(320, 240);
var mat1:BitmapMaterial = new BitmapMaterial(bmd);
mat1.oneSide = false;
var plane1:Plane = new Plane(mat1,320, 240, 5, 5);
plane1.x = Math.cos(Math.PI*2) * radius;
plane1.z = Math.sin(Math.PI*2) * radius;
plane1.rotationY = 270;
var mat2:BitmapMaterial = new BitmapMaterial(bmd2);
mat2.oneSide = false;
var plane2:Plane = new Plane(mat2,320, 240);
plane2.x = Math.cos(Math.PI/2) * radius;
plane2.z = Math.sin(Math.PI/2) * radius;
plane2.rotationY = 180;
var mat3:BitmapMaterial = new BitmapMaterial(bmd3);
mat3.oneSide = false;
var plane3:Plane = new Plane(mat3,320, 240);
plane3.x = Math.cos(Math.PI) * radius;
plane3.z = Math.sin(Math.PI) * radius;
plane3.rotationY = 90;
var mat4:BitmapMaterial = new BitmapMaterial(bmd4);
mat4.oneSide = false;
var plane4:Plane = new Plane(mat4,320, 240);
plane4.x = Math.cos(Math.PI*1.5) * radius;
plane4.z = Math.sin(Math.PI*1.5) * radius;
plane4.rotationY = 0;
s.addChild(plane1);
s.addChild(plane2);
s.addChild(plane3);
s.addChild(plane4);
this.addEventListener(Event.ENTER_FRAME, render);
var angle:Number = 0;
function render(e:Event)
{
angle += (this.mouseX – 320) * 0.001;
cam.x = Math.cos(angle) * 900;
cam.z = Math.sin(angle) * 900;
cam.target = center;
bmd.draw(vid1.v);
bmd2.draw(vid2.v);
bmd3.draw(vid3.v);
bmd4.draw(vid4.v);
mat1.updateBitmap();
mat2.updateBitmap();
mat3.updateBitmap();
mat4.updateBitmap();
s.renderCamera(cam);
}
vid1.visible = false;
vid2.visible = false;
vid3.visible = false;
vid4.visible = false;[/as]
Lee











