Posts Tagged ‘flash’

UPDATE: A better a more complete tutorial can now be found here:

To Load .DAE files – simply use this code in Flash AS3:

import org.papervision3d.objects.parsers.*;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.events.FileLoadEvent;
private var modelDAE:DAE;
private function load(){modelDAE = new DAE( );modelDAE.texturePath = “”; // assume that textures are in main DAE’s foldermodelDAE.load( “path/to/file.dae” );
modelDAE.addEventListener( FileLoadEvent.LOAD_COMPLETE , ldrComplete );}
private function ldrComplete( e:Event ):void{try{model = DisplayObject3D( modelDAE );
}
catch( e:TypeError ){loading = ERROR;return;}//And then you simply call the load
function:load();

There are no error handlers in this code, only the basics of importing a model and loading it in flash. – more detailed tutorials will come soon with user interaction!

sign up to the RSS feed to find out when i have released it!
Subscribe
Follow me on Twitter
free counters
PayPal Donation
If you like this blog and the help it has given you, why not donate for this good cause? Click on the button below to pay Safely and Securely through PayPal.
Thanks.