[Papervision3D] Problems with native Papervision 2.0 classes????

catbreathrum j.plotts at hotmail.com
Wed Dec 17 08:51:26 PST 2008


I keep getting this error when I attempt to run my papervision environment.

1067: Implicit coercion of a value of type
org.papervision3d.core.geom.renderables:Vertex3D to an unrelated type
org.papervision3d.core.geom:Vertex3D.

This is strange to me, because I don't directly instantiate a vertex3d in my
AS.  It seems like it's a syntax error in the papervisions classes... ???
but that doesn't make sense...

here's my code....  let me know what I'm doing wrong... I'm completely
baffled

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

var container:Sprite = new Sprite();
var myText:TextField;
container.x = stage.stageWidth *0.5;
container.y = stage.stageHeight *0.5;
addChild(container);


var scene = new InteractiveScene3D(container);
var camera:Camera3D = new Camera3D();
camera.zoom =10;



for (var i:uint=0; i<20; i++) {

        myText = new TextField();
        myText.text = "joseph";
        var bitmap:BitmapData = new BitmapData(100,100);
        bitmap.draw(myText);
        var material:BitmapMaterial = new BitmapMaterial(bitmap);
        material.interactive = true;
        material.smooth = true;
        material.doubleSided = true;
        var p:Plane = new Plane(material,100,100);
        p.x = Math.random()*1000 -500;
        p.y = Math.random()*1000 -500;
        p.z = Math.random()*1000 -500;
        //p.rotationY = Math.random()*360;
        //p.addEventListener(MouseEvent.CLICK, onClick );
        p.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, onClick );
        scene.addChild(p);

}
scene.renderCamera(camera);



function onClick(e:InteractiveScene3DEvent){
        trace('onclick');
}

-- 
View this message in context: http://www.nabble.com/Problems-with-native-Papervision-2.0-classes-----tp21056802p21056802.html
Sent from the Papervision3D mailing list archive at Nabble.com.




More information about the Papervision3D mailing list