obj mtl embed Error

Software: Away3D 4.x

RIPI, Jr. Member
Posted: 08 December 2011 10:34 AM   Total Posts: 33

Hey Guys!
I’m trying to load an embedded obj-file with away3d 4.0. The mtl-file is also embedded an the dependencies are set like that:

var mtl_context:AssetLoaderContext = new AssetLoaderContext();
mtl_context.mapUrlToData("shoe.mtl"SHOE_MTL);
   
_modelLoader = new Loader3D();
_modelLoader.addEventListener(LoaderEvent.RESOURCE_COMPLETE_onResourceComplete);
_modelLoader.parseData(SHOE_OBJnull,mtl_context); 

Now the compiler throws an exception fault, that SHOE_MTL is not of type ByteArray. SHOW_MTL is embedded as Class, and i saw this approach in one of the broomstick-examples in github… what am i doing wrong?

working around the embedding thing is no oppurtunity.

Thanks in advance for your help!

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X