[Papervision3D] wiiflash+virtualMouse
NElizaga
ne at planitagency.com
Tue May 6 18:40:30 PDT 2008
Hi dougi, I think we have the same issue :) I can't quite think of how to
solve this, but a possible solution could be:
- keep an array or object list of your interactive objects
- run a timer to check whether that object us under the mouse pointer
- if so, trigger the object's mouse over state (not sure how)
Probably not the most efficient way, but it might work for now.
-Nick
dougi wrote:
>
> Essentially, here is what i have made.
>
> viewport = new Viewport3D(0,0,true, true);//interactive
> ....
> stage.addEventListener(Event.ENTER_FRAME, loop);
> ...
> var bitmapMaterial:BitmapMaterial = new BitmapMaterial( new
> ImageClass().bitmapData );
> bitmapMaterial.interactive = true;
> bitmapMaterial.doubleSided = true;
>
> plane = new Plane(bitmapMaterial, 1000, 1000, 4, 4);
> plane.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, onPress);
> scene.addChild(plane);
> ...
>
> private function onPress(event:InteractiveScene3DEvent):void
> {
> Alert.show("Pefect! po3D was cliked. ");
> }
>
> private function loop():void
> {
> // newx&newy are calculated from my wiimote new location
> cursor.x = newx; cursor.y=newy;
> ism.virtualMouse.setLocation(newx, newy);
> ...
> }
>
> // my wiimote button handlers
> private function bPressHandler(event:ButtonEvent):void
> {
> ism.virtualMouse.press();
> }
>
> private function bReleaseHandler(event:ButtonEvent):void
> {
> ism.virtualMouse.release();
> }
>
> I have also noticed that a button inside an alertbox is captured with
> senocular virtualMouse but not with the virtualMouse provided with pv3d. A
> mix of the two is perhaps needed.
>
> any idea?
>
>
--
View this message in context: http://www.nabble.com/wiiflash%2BvirtualMouse-tp16702226p17093706.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list