[Papervision3D] Interactive Objects (Mouse Events)
Paul Tondeur
paul at paultondeur.nl
Thu Apr 16 16:40:24 PDT 2009
Hi Derek,
Have you tried setting mat.interactive = value recursively on all
children of the targetobject inside your setInteractiveMaterials
method? You define eventlisteners recursively for all the child
objects of your collada , but you don't set mat.interactive = true
recursively.
You could try to replace your setInteractiveMaterials method by this
one:
private function setInteractiveMaterials(targetObject:DisplayObject3D,
value:Boolean):void
{
for each(var mat:MaterialObject3D in
targetObject.materials.materialsByName)
{
mat.interactive = value;
}
for each(var child:DisplayObject3D in targetObject.children) {
setInteractiveMaterials(child,value);
}
}
Hope that works!
Paul
On Apr 17, 2009, at 1:17 AM, derekobrien wrote:
>
> Thanks,
>
> I modified my actionscript to:
> [Actionscript]
> private function setupPV3D():void
> {
> scene = new Scene3D();
> cam = new Camera3D();
> cam.z = -1000;
> cam.y = 300;
> vp = new Viewport3D(600, 400, false, true, true, true);
> bre = new BasicRenderEngine();
> addChild(vp);
> }
> [/Actionscript]
>
> but still nothing, flash renders cube with material but when I click
> on the
> cube.... nothing. :-(
>
> Derek
> --
> View this message in context: http://www.nabble.com/Interactive-Objects-%28Mouse-Events%29-tp23087249p23088381.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
More information about the Papervision3D
mailing list