I cannot load textures along with 3ds models…

Software: Away3D 4.x

Kicker, Member
Posted: 21 June 2015 02:27 PM   Total Posts: 52

Hi,

I have a file my_mesh.3ds, and a texture attached to it with specific coordinates, my_tex.png.

When I load the file offline, everything works just fine, but as soon as I upload them on a server, and loading takes more than a split second, my texture is replaced with a checkboard texture, and I get this error message:

TypeError: Error #1034: Type Coercion failed: cannot convert away3d.events::LoaderEvent@8a25d99 to flash.events.IOErrorEvent.

Here’s my code:

private function loadMesh(url:String):void
{
 _meshLoader 
= new Loader3D();
 
_meshLoader.addEventListener(ProgressEvent.PROGRESSonAssetLoadingProgress);
 
_meshLoader.addEventListener(AssetEvent.MESH_COMPLETEonAssetLoadingComplete);
 
_meshLoader.addEventListener(LoaderEvent.LOAD_ERRORonLoadingError);
 
_meshLoader.load(new URLRequest(url), new AssetLoaderContext());

 
state STATE_LOADING;

I also tried to listen to LoaderEvent.RESOURCE_COMPLETE instead of AssetEvent.MESH_COMPLETE, but then I get the error message offline too…

Thanks in advance

Edit: Sorry for double-post, didn’t do it on purpose…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X