Cannot load model in different folder, using relative paths

Software: Away3D 4.x

jcmolinari, Newbie
Posted: 28 March 2012 10:01 PM   Total Posts: 1

Hi,

I have had problems getting my models to load when ran online and in a different folder, but work fine when running the file directly from the debug folder (running debug in flash builder). 

For example, in the browser header: “file///c:/project1/bin-debug/file.swf” works fine, while “http://www.domain.com/bin-debug/file.swf” and “file///c:/project1/bin-release/file.swf” or even “file///c:/project1/bin-debug2/file.swf” does not load the 3d model. In all cases, there is an assets folder with the model inside it, relative to the swf.

I am using a simple way for loading and it works fine when debugging.

...
Loader:Loader3D = new Loader3D();
loader.load(new URLRequest(‘assets/vase.awd’));
loader.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);

}
private function onResourceComplete(event : LoaderEvent) : void
{  loader.removeEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);
view.scene.addChild(loader);
}

But, when I run this through my browser on the web server, no model is loaded. Also, when I simply rename the debug folder from “bin-debug” to “bin-debug2”, it also does not find the model. I cannot find any reference to the bin-debug folder in my code, anywhere.

I added a crossdomain.xml file with a * wildcard to make sure there were no security issues when loading from anywhere. I am using the latest version of Away3D, just downloaded last week. I am using Flash Builder 4.5 with Flex 4.5.1. I have searched everywhere and cannot find anyone else with this issue.
I also tried and have the same issues using the AssetLibrary class.

Does anyone have any ideas as to why I am having these issues?
Thanks

   

John Wilson, Member
Posted: 16 July 2012 10:12 AM   Total Posts: 62   [ # 1 ]

Hi,

Did you solve this problem.  I’m having exactly the same problem.  It works fine when running in in the debug player, but i get a streaming error #2032 when I try to run it in a browser.

I tried running the Away3D Physics BvhTriangleMeshCarTest.as example which used to work, but it fails too.  I’ve tried the latest GitHub master and dev branches - no luck.

Regards,

John WIlson

   

Avatar
Matse, Sr. Member
Posted: 16 July 2012 11:52 AM   Total Posts: 149   [ # 2 ]

I’m no server expert but have a feeling it could be because the server has gzip compression enabled. Not sure how to check that but you should find easily on the web.

   

John Wilson, Member
Posted: 16 July 2012 12:34 PM   Total Posts: 62   [ # 3 ]

Thanks, Matse.

I tried switching compression off on my server but it made no difference. 

I can use the ordinary as3 loader to load an image from the same location and that works fine.  Plus the fact that I had made no changes to the server since the the Away3D 4 Physics BvhTriangleMeshCarTest.as example used to work.

I’m baffled.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X