Maybe somebody had similar issue. Trying to load DAE model using papervision3d in Flash AS3. I want that after user opens swf file it loads DAE model and texture from other server.
I'm using this code to link the model:
After compiling it with flash it works good. But after i upload my swf file to web, it dont work, shows empty screen.Code:ModelDAE.load( "h ttp://... someurl.com/model.dae", materialsList);
If I put DAE model ant texture in the same server and in the same folder together and linking model like this: "model.dae" it's working. But I want that model would be loaded from other server.
Thanks for any advice.
Code:
Code:package { import flash.display.Bitmap; import flash.events.Event; import org.papervision3d.materials.BitmapFileMaterial; import org.papervision3d.materials.utils.MaterialsList; import org.papervision3d.objects.parsers.DAE; import org.papervision3d.view.BasicView; public class ProjectDAE extends BasicView { private var ModelDAE:DAE; protected var bitmapMaterial:BitmapFileMaterial; public function ProjectDAE () { this.loaderInfo.addEventListener ( Event.COMPLETE, onFullyLoaded ); } private function onFullyLoaded(e:Event):void { bitmapMaterial = new BitmapFileMaterial( "h ttp://....jpg"); var materialsList:MaterialsList = new MaterialsList ( ) ; materialsList.addMaterial ( bitmapMaterial, "all" ) ; ModelDAE = new DAE(); ModelDAE.load( "h ttp://....dae", materialsList); this.scene.addChild(ModelDAE); this.startRendering ( ) ; } override protected function onRenderTick(event:Event = null):void { super.onRenderTick ( event ); } } }


Reply With Quote