How is the MouseEvent3D.CLICK Event implemented?

Software: Away3D 4.x

cervantez, Newbie
Posted: 21 August 2012 03:15 PM   Total Posts: 6

I have some weird problems with MouseEvent3D.CLICK.

I have a scene and add a sphere to it, adding a click listener to the sphere.
When I go mousedown outside of the sphere and mouseup inside the sphere I get a click event. Thats a bit of a problem, ´cause I´m listening for click and not mouseup.

Bug? Or what did I miss?

   

cervantez, Newbie
Posted: 22 August 2012 01:46 PM   Total Posts: 6   [ # 1 ]

Does MouseEvent3D.CLICK work properly?

   

Mr Margaret Scratcher, Sr. Member
Posted: 22 August 2012 11:38 PM   Total Posts: 344   [ # 2 ]

I’ve got a funny feeling I had a similar problem*

I got around it by having a function on mousedown, and then a function on mouseup which checked if it was the same mesh that triggered the event, and if so, executes the required function.


(*Actually, I think it was the opposite way round - I did the above method, initially, and then when I noticed there was a ‘CLICK’ option I kicked myself and swithed to that, only to find it didn’t work and reverted back. This was a while back though, not sure if it;s the same now..)

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X