Hello
I never use Collada, but i've been trying to search other posts to solve
your problem. Here is what i found :
If you can't see anything on your screen after your collada is loaded, try
this one :
private function addCollada():void
{
loader = new Loader3D();
loader.addEventListener(Loader3DEvent.LOAD_SUCCESS,onLoaderSuccess);
loader.addEventListener(Loader3DEvent.LOAD_PROGRESS,onLoaderProgress);
loader.addEventListener(Loader3DEvent.LOAD_ERROR,onLoaderError);
loader.loadGeometry("earth.dae",new Collada());
}
private function onLoaderSuccess(e:Loader3DEvent):void
{
trace("my collada has been loaded.");
for each (var m:Mesh in loader.children)
{
if (m==null)
continue;
view.scene.addChild(m);
}
loader.removeEventListener(Loader3DEvent.LOAD_SUCCESS,onLoaderSuccess);
loader.removeEventListener(Loader3DEvent.LOAD_PROGRESS,onLoaderProgress);
loader.removeEventListener(Loader3DEvent.LOAD_ERROR,onLoaderError);
}
Hope it works. Good luck.
On Wed, Nov 3, 2010 at 3:00 AM, Funky Dude <[email protected]> wrote:
> You can see what I did here...
>
> http://pastebin.com/p9hGRvkv
>
> The earth.dae is in the same directory as my .swf and main.as file
>
> If you look at lines 66-70, you'll see I tried to use the Loader3D to
> load the earth.dae Collada file.
>
> addCube() is a method I created, it simply adds a cube, which works,
> but only if I comment out/hide lines 66-70.
>
> Any ideas what I'm missing?
>
> Thanks!
--
Aji Pamungkas