[Papervision3D] plane width and height
laurent
laurent at logiquefloue.org
Thu Aug 23 18:33:26 PDT 2007
I'm not adding a listener to each object on the scene, there's a global
listener on the scene that target a clicked object for instance.
so it's like this:
ism.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK,
mouseDown);
public function mouseDown(e:InteractiveScene3DEvent):void{
var canvas:DisplayObject3D;
if(e.displayObject3D != null)
{
canvas = e.displayObject3D;
}
else
{
canvas = e.face3d.face3DInstance.instance;
}
blablablabla
}
e contains :
this.displayObject3D = container3d;
this.sprite = sprite;
this.face3d = face3d;
this.interactiveContainerData = interactiveContainerData;
don't know from wich one I can get to the Plane.
thx
L
xero a écrit :
> when yew setup the listener on the plane for mouse events...
>
> plane.addEventListener(MouseEvent.CLICK, moveone);
>
> yew can access the plane from the event passes to the function...
>
> private function moveone(e:MouseEvent):void
> {
> var thing:DisplayObject = e.target as DisplayObject;
> thing.x = 200;
> thing.y = 200;
> }
>
> thing in this case, is the plane that gets clicked...
> hope this helps...
> ____ ___
> \ \/ /___________ ____
> .\ // __ \_ __ \/ _ \
> ./ \ ___/| | \( <_> )
> /___/\ \___ >__|---\____/
> | \_/ \/ |
> | xero harrison |
> | x at xero.nu <mailto:x at xero.nu> |
> | http://xero.nu |
> | http://fontvir.us |
> | http://xero.owns.us |
> `---------------------'
>
>
>
> ---------- Forwarded message ----------
> From: laurent <laurent at logiquefloue.org
> <mailto:laurent at logiquefloue.org>>
> To: papervision3d at osflash.org <mailto:papervision3d at osflash.org>
> Date: Thu, 23 Aug 2007 23:33:57 +0200
> Subject: [Papervision3D] plane width and height
>
> hm...I could just try plane.width , but my problem is I don't know
> how to
> access a plane object from the interactiveSceneEvent.
> It's easy to get to the DO3D and get x, y, z, etc... but in the
> future I
> will need to access that Plane object clicked.
>
> thx
> L
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
More information about the Papervision3D
mailing list