[Papervision3D] Loading a Collada file HELP?
John Christopher White
jwhite at mediatechinc.com
Mon Oct 20 14:34:08 PDT 2008
Hello. I am very new to this but am seeing that there appears to be many
ways to get a DAE file into papervision3d. Could someone give me a simple
example of just importing a single model that was exported directly from 3d
studio? Below is a couple of lines of code I had been given before and both
generate random errors for me. In fact even the sample files I have
downloaded seem to randomly work and I can't find a straight forward
tutorial that explains this.
My end product would just be a few modeling sitting around in a scene that
could be interacted with, maybe allow the viewer to control the camera with
the arrow keys.
Thanks in advance, below is the code I have tried.
{
import org.papervision3d.objects.parsers.DAE;
import org.papervision3d.events.FileLoadEvent;
public class loadDAE
{
public function loadDAE(url)
{
var dae:DAE = new DAE();
dae.addEventListener(FileLoadEvent.LOAD_COMPLETE, onLoad);
dae.load(myfilename.dae);
}
private static function onLoad(e:FileLoadEvent):void{
//do what you need
}
}
}
And
import org.papervision3d.objects.parsers.DAE;
var daeFile = new DAE("myfilename.dae");
universe.addChild(daeFile);
--
John Christopher White
MediaTech
www.mediatechinc.com
This e-mail and any attachments are confidential and may be protected by
legal, professional or other privilege. If you are not the intended
recipient you should not store it, copy it, re-transmit it, use it or
disclose its contents, but should immediately notify the sender that you are
not the intended recipient and delete this copy from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20081020/368e44da/attachment-0001.html
More information about the Papervision3D
mailing list