[Papervision3D] [InteractiveMovieMaterial] material movie clip mouse coordinates
John Grden
neoriley at gmail.com
Tue Aug 21 07:10:40 PDT 2007
if I'm not over an INteractive 3D object, it's 0,0 like you described
On 8/21/07, John Grden <neoriley at gmail.com> wrote:
>
> Ok, I tested, and as long as I'm over a 3D object thats interactive (IE:
> has an interactive material) it works:
>
> trace("location", ism.virtualMouse.getLocation().x,
> ism.virtualMouse.getLocation().y);
>
> // outputs:
>
> location 73.9490720807065 106.00043229956681
> location 74.94599499697068 111.03654828083451
> location 74.9365767070219 117.07431833034538
> location 74.91630676284802 120.1300718450249
> location 75.90499307023167 124.17572184210655
> location 76.89417567296874 126.23108526137601
> location 76.88452988447393 129.28373705703916
> location 81.89405176764303 136.3930699811276
> location 86.90792674610141 139.5551279765514
> location 88.91835437765354 140.6283071646283
> location 88.91835437765354 140.6283071646283
> location 91.94185184778311 140.64290134343972
> location 105.04337890369023 141.63180990698277
> location 129.2426547860965 136.60727228774132
> location 150.47778503829196 136.7677623167775
> location 151.69922981003126 134.99410112813973
> location 151.69922981003126 134.99410112813973
> location 151.69922981003126 134.99410112813973
> location 151.69922981003126 134.99410112813973
> location 151.69922981003126 134.99410112813973
> location 151.69922981003126 134.99410112813973
> location 151.69922981003126 134.99410112813973
> location 151.69922981003126 134.99410112813973
> location 153.7225791984737 135.98095137670362
> location 155.80929334223072 138.10085224846335
> location 155.80929334223072 138.10085224846335
> location 169.15711238408983 144.48320864634488
>
> On 8/21/07, peperg-google <peperg at gmail.com> wrote:
> >
> > I tried. It retrurns the same values (127, 340 or something) don't
> > matter
> > where I click. :-(
> >
> >
> > Dnia 21-08-2007 o 14:47:45 John Grden <neoriley at gmail.com> napisał(a):
> >
> > > maybe try localX and localY properties of the received mouse event?
> > >
> > > On 8/21/07, peperg-google <peperg at gmail.com> wrote:
> > >>
> > >> Hi.
> > >>
> > >> I'm trying to use InteractiveMovieMaterial.
> > >> Is it possible to get mouse x and y on original movie clip ?
> > >> I tried :
> > >>
> > >> ....
> > >> this.scene = new InteractiveScene3D( container );
> > >> ism = scene.interactiveSceneManager;
> > >> ...
> > >> material.movie.addEventListener(MouseEvent.CLICK,this.textureClick);
> > >> ...
> > >>
> > >> and:
> > >>
> > >>
> > >> private function textureClick(evt:MouseEvent) {
> > >> var loc:Point= ism.virtualMouse.getLocation();
> > >> trace(loc.x+ " " + loc.y);
> > >> }
> > >>
> > >>
> > >> but it shows 0 0 all the time.
> > >>
> > >> I used boxDemo as the example so there are :
> > >>
> > >> InteractiveSceneManager.SHOW_DRAWN_FACES = false;
> > >> InteractiveSceneManager.DEFAULT_SPRITE_ALPHA = 1;
> > >> InteractiveSceneManager.DEFAULT_FILL_ALPHA = 1;
> > >> BitmapMaterial.AUTO_MIP_MAPPING = true;
> > >> DisplayObject3D.faceLevelMode = false;
> > >> ism.buttonMode = true;
> > >> ism.faceLevelMode = true;
> > >> ism.mouseInteractionMode = false;
> > >>
> > >>
> > >> Maybe I should change something, or maybe it's not virtualMouse what
> > I
> > >> need ?
> > >>
> > >> _______________________________________________
> > >> Papervision3D mailing list
> > >> Papervision3D at osflash.org
> > >> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> > >>
> > >
> > >
> > >
> >
> >
> >
> > _______________________________________________
> > Papervision3D mailing list
> > Papervision3D at osflash.org
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >
>
>
>
> --
> [ JPG ]
--
[ JPG ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070821/ba1cff29/attachment.html
More information about the Papervision3D
mailing list