Prefab resolves urls and also unescape them.
just open bitmapFilematerial and add a trace where the url is passed to load 
the image.
you probably will get hints there.

note that you also can pass a custom path to AWData parser for your images 
directory as well.

like var ap:AWData = new AWData();
ap.pathToSources("/stuff/otherstuff/myimages/");

you also can add to init object of the AWData instance like this if you use the 
parse handler for embedded awd files
var ap:AWData = new AWData({customPath:"/stuff/otherstuff/myimages/"});

Fabrice


On Jun 26, 2010, at 7:37 PM, Th3Sh33p wrote:

> I created a tree model, which I would like to place in my project, it
> was created as a obj file,  imported into prefab, then a texture was
> added and I exported as a awd file. Then I used this script...
> 
> var model_number:int = 0
> var model:String = "tree";
> var ld:Loader3D = new Loader3D()
> ld.addEventListener(Loader3DEvent.LOAD_SUCCESS,model_loaded);
> ld.addEventListener(Loader3DEvent.LOAD_ERROR,model_errored);
> ld.name = String(model_number);
> var ap:AWData = new AWData()
> ld.loadGeometry("unit/"+model+"/"+model+".awd",ap);
> 
> private function model_loaded(e:Loader3DEvent){
> constructed[Number(e.target.name)] = e.target.handle
> }
> .. to import the model, which was successful, however the model has no
> material or texture. I have tried various things I've seen on other
> threads but the model is always white when imported.The folder
> "images" is located next to "tree.awd".
> 
> How can I import this model with it's material?
> 
> *The model imports successfully with textures back into prefab

Reply via email to