package { import away3d.containers.View3D; import away3d.materials.BitmapFileMaterial; import away3d.primitives.Sphere; import flash.display.Sprite; import flash.events.Event; [SWF(width="500", height="200", frameRate="60", backgroundColor="#FFFFFF")] public class Basic09_BitmapFileMaterial extends Sprite { private var view:View3D; public function Basic09_BitmapFileMaterial() { view = new View3D({x:250,y:100}); addChild(view); var earthMaterial:BitmapFileMaterial = new BitmapFileMaterial("http://www.flashmagazine.com/articlefiles/away3d/resources/earthmap1k.jpg"); var sphere:Sphere = new Sphere({material:earthMaterial}); view.scene.addChild(sphere); this.addEventListener(Event.ENTER_FRAME,update); } private function update(e:Event):void { view.render(); } } }