import Collada in Flash CS3

Hello i would like to import in my scene a Collada file but there is an error message
here is my script-(papervision) :

import flash.display.;
import flash.events.
;

import org.papervision3d.cameras.;
import org.papervision3d.events.
;
import org.papervision3d.materials.;
import org.papervision3d.objects.
;
import org.papervision3d.scenes.*;

var container :Sprite;
var scene :Scene3D;
var camera :Camera3D;
var jordan:Collada;

container = new Sprite();
	addChild( container );
	container.x = 500;
	container.y = 300;

	// Create scene
	scene = new Scene3D( container );

	// Create camera
	camera = new Camera3D();
	camera.x = 3000;
	camera.z = -300;
	camera.zoom = 10;
	camera.focus = 100;
	jordan = new Collada("texturedCube.dae")

	
	 scene.addChild(jordan); 
	scene.renderCamera( camera );

and my message :

Papervision3D Beta 1.7 (20.08.07)

DisplayObject3D: null
DisplayObject3D: null
DisplayObject3D: null
DisplayObject3D: Cube
TypeError: Error #1009: Il est impossible d’accéder à la propriété ou à la méthode d’une référence d’objet nul.
at org.papervision3d.objects::Collada/::buildObject()
at org.papervision3d.objects::Collada/::parseGeometry()
at org.papervision3d.objects::Collada/::parseNode()
at org.papervision3d.objects::Collada/::parseScene()
at org.papervision3d.objects::Collada/::buildCollada()
at org.papervision3d.objects::Collada/::onComplete()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()

it’s in french it says it’s impossible to access to the proprty from a reference null

Help me please!!

Bonjour flecherouge,

Your version of Papervision seems to be a month old.
IIRC some significant fixes have been made to the COLLADA loader since then, so I recommend you update to the latest version of the code and try again…

You can find the latest version of the ascollada here, as a branch of the Papervision repository:
http://papervision3d.googlecode.com/svn … ascollada/

or here in its own repository:
http://ascollada.googlecode.com/svn/trunk/as3/trunk/

Hope it helps,

Alex

Dear feriend

I wish try to import a my 3D model in flash with papervision3D.

I’ve made a simple sphere in MAYA and I’ve exported it in Collada (.dae)

I wish import it in my flash…

and I try to use your corde, but i’ve more error…

Papervision3D Beta 1.7 (20.08.07)

DisplayObject3D: null
DisplayObject3D: null
DisplayObject3D: null
DisplayObject3D: pSphere1
TypeError: Error #1009: Impossibile accedere a una proprietà o a un metodo di un riferimento oggetto null.
at org.papervision3d.objects::Collada/::buildObject()
at org.papervision3d.objects::Collada/::parseGeometry()
at org.papervision3d.objects::Collada/::parseNode()
at org.papervision3d.objects::Collada/::parseScene()
at org.papervision3d.objects::Collada/::buildCollada()
at org.papervision3d.objects::Collada/::onComplete()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()