January Quick Post
January 27th, 2009 by brooks
Type of thing: 3d flash Lead-Story
It is a new year and the first month is over. So far this year I have been headed into interactive space more and more. I made a little headway back into Flash and 3D, using ActionScript 3 and Papervision. I also want to take a minute to check out Loworks website. I liked reading the thinking by Haruki Higashi in the winter issue of Computer Arts Projects. It is a good year for change and continuation.
requires flash player
The animation above is from the basic example to test Papervision. The example on Google Code did not work, so here is the code I used (rocketclowns pointed me in the right direction).
package { import flash.display.Sprite; import flash.events.Event; import org.papervision3d.objects.primitives.Plane; import org.papervision3d.materials.ColorMaterial; import org.papervision3d.view.BasicView; public class ExampleTransformationRotate extends BasicView { private var plane:Plane; public function ExampleTransformationRotate() { super(); var material:ColorMaterial = new ColorMaterial(); material.doubleSided = true; material.fillColor = 0xFF0000; material.fillAlpha = 1.0; plane = new Plane(material, 300, 300, 1, 1); scene.addChild(plane); stage.addEventListener(Event.ENTER_FRAME, render); } private function render(event:Event):void { plane.rotationX += 4.35; plane.rotationY += 6.55; plane.rotationZ += 0.55; singleRender(); } } }
Let me know if this helps anybody.
I just downloaded the papervision using SVN and tried this piece of coding because the google code one wasnt working. I have nothing coming up in my swf. It’s just a white background with no red plane. I’ve followed the google code steps of the document class using this as the coding in the .as file
Any ideas why this is happeneing?
Mo