Hi!
I can’t change the material in a model.
var loader:Loader3D = new Loader3D();
loader.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);
loader.load(new URLRequest(‘flat_test.dae’));
...
onResourceComplete(e:LoaderEvent):void {
// not works :(
loader.getChild(0).getChild(0).material = new ColorMaterial();
}
Here is the model and texture (2.7 Mb):
https://dl.dropboxusercontent.com/u/8126219/flat_test.dae.zip
Loader3D and changing mesh materialSoftware: Away3D 4.x |
||
fmax, Newbie
Posted: 20 October 2013 09:30 AM Total Posts: 10 |
||
GoroMatsumoto, Sr. Member
Posted: 20 October 2013 11:18 AM Total Posts: 166 [ # 1 ] You can get informations of your assets by “AssetEvent”.
loader.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete); |
||
fmax, Newbie
Posted: 20 October 2013 11:37 AM Total Posts: 10 [ # 2 ]
I don’t need information about my assets, I’d like to change some submeshes in runtime. Unfortunately, not works for me ( I used AssetEvent.ASSET_COMPLETE)
if (assetType == 'mesh') {
|
||
|
||
|