[Papervision3D] How can I make a Button out of a 3D-Object?
John Grden
neoriley at gmail.com
Thu Aug 16 08:02:43 PDT 2007
that all looks good to me
have you tried listening for those same events but listening from the ISM
rather than the object? You should be able to do both
rootNode.interactiveSceneManager.addEventListener(
InteractiveScene3DEvent.OBJECT_CLICK, handleMouseClick);
Sorry for the docs, they'll be updated with the new ISM stuff we're
releasing this week
On 8/16/07, theforce <tassadar234 at yahoo.com> wrote:
>
>
> Thanks for the information, but it still doesn't work. :-(
>
> Why are all these "Interactive..." Objects not listed in the PV-Online-API
> ?
> I just didn't know that they exist.
>
> But well here is the code I've got for my program and there is again no
> working Click-Event on the Object:
>
> CODE:
> ....
> scene = new InteractiveScene3D( container );
>
> var mam:InteractiveBitmapAssetMaterial = new
> InteractiveBitmapAssetMaterial("psychedelictexture.png");
>
> var plane1:Plane = new Plane( mam, 500, 500, 3, 3);
> var cube1:Cube_ext = new Cube_ext( mam, 200, 200, 200, 8, 8, 8 );
>
> rootNode = scene.addChild( new DisplayObject3D("rootNode") );
> rootNode.addChild( plane1, "plane01");
> rootNode.addChild( cube1, "cube01" );
>
> cube1.x = 200;
> cube1.y = -300;
> cube1.z = 300;
> cube1.addEventListener( InteractiveScene3DEvent.OBJECT_CLICK, onMouseClick
> );
> ...
>
> The Cube_ext-Class consists of the following lines of code:
> ...
> public class Cube_ext extends Cube {
>
> private var mc:Sprite;
>
>
> public function Cube_ext( material:MaterialObject3D = null, width:Number =
> 500, depth:Number = 500, height:Number = 500, __segmentsS:Number = 1,
> __segmentsT:Number = 1, __segmentsH:Number = 1, initObject:Object = null
> ):void
> {
> super( material, width, depth, height, __segmentsS, __segmentsT,
> __segmentsH, initObject );
> init();
> }
>
> private function init():void {
> trace("init "+name);
> addEventListener(InteractiveScene3DEvent.OBJECT_CLICK,
> mousePressed);
> }
> ...
>
> I just don't know, why it doesn't work! :-(
> --
> View this message in context:
> http://www.nabble.com/How-can-I-make-a-Button-out-of-a-3D-Object--tf4271591.html#a12178335
> 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
>
--
[ JPG ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070816/1c5aa289/attachment.html
More information about the Papervision3D
mailing list