Tutorial Papervision3D – Load Collada DAE example source

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | package { import flash.events.Event; import org.papervision3d.materials.utils.MaterialsList; import org.papervision3d.materials.WireframeMaterial; import org.papervision3d.objects.parsers.DAE; import org.papervision3d.objects.DisplayObject3D; import org.papervision3d.view.BasicView; import flash.display.Sprite; public class Main extends BasicView { private var _obj:DAE; public function Main() { super(0, 0, true); createObject(); _camera.zoom = 1000 / _camera.focus + 1; var cameraTarget:DisplayObject3D = new DisplayObject3D(); _camera.target = cameraTarget; startRendering(); } private function createObject():void { _obj = new DAE(false, "objeto"); _obj.load("soccer.DAE"); scene.addChild(_obj); } override protected function onRenderTick(event:Event = null):void { _obj.roll(1); super.onRenderTick(event); } } } |


I liked that. I tried something like that too. But i can’t see anything. It is working fine on my desktop offline but when i upload to a webpage it is not loading 3D object. I even downloaded your file and published for html and uploaded it. Still its not showing me the soccer ball. Do you got any clue. How to fix this. In fact it gave me an error
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: ../soccer.dae
Please help me out thank you.
Hi Junaid,
It looks like the demo can’t find soccer.dae file. Be sure it is on the server in the same folder that the swf file.
Hi there. I have already placed files in the same folder. but still it is not working. ../ is just i am hiding my real link. got any other solution. thanks @miguelMoraleda
Hi Junaid,
You might need to add *.DAE mime type to your server.
Hi Darren,
I am not sure how to do that. If you can help me out in that. It would be great thanx.
@darren