MouseLeave and Dragged events not working
by Eric Sapp · in iTorque 2D · 10/16/2009 (2:42 am) · 16 replies
Hey all,
I'm trying to trouble shoot a problem with the mouseLeave and mouseDragged callbacks which aren't triggering in 1.3. I've seen this problem posted before but haven't found a solution anywhere in forums. Is this a bug? Thanks for your help.
-Eric
I'm trying to trouble shoot a problem with the mouseLeave and mouseDragged callbacks which aren't triggering in 1.3. I've seen this problem posted before but haven't found a solution anywhere in forums. Is this a bug? Thanks for your help.
-Eric
About the author
#2
10/17/2009 (7:22 pm)
Thanks for posting that link Zilla. I did make those changes but it didn't fix the problem. After creating a new test project the onMouseLeave callback worked on the simulator though. Doesn't make sense. Anyone else still having trouble with this issue?
#3
10/19/2009 (5:09 am)
I'm having onMouseDragged issues, havn't noticed a solution anywhere yet.
#4
10/22/2009 (11:55 am)
me too, thought i was going mad.
#5
10/22/2009 (12:32 pm)
Those are broken in 1.3 and were reported back when the 1.3 beta was released.
#6
so i can't use onMouseDragged till they release 1.3 proper?
10/23/2009 (5:08 am)
Thanks Brett, where can i see the list of what else maybe broken?so i can't use onMouseDragged till they release 1.3 proper?
#7
10/23/2009 (5:26 am)
More until 1.3 Beta 2, as it is broken to a degree that makes 0 sense to be released without indepth testing (there are more new issues through regression than there are issues fixed in 1.3 vs 1.2 ... as far as I see, your best bet at the time is iTGB 1.1 I fear)
#8
Im looking into this, but if it works on the simulator it should be working on the device as well as there is no separate code module for either.
10/24/2009 (4:47 am)
Quote:
the onMouseLeave callback worked on the simulator though
Im looking into this, but if it works on the simulator it should be working on the device as well as there is no separate code module for either.
#9
Please let us know if you find the problem.
Thanks,
10/24/2009 (8:35 am)
I can confirm that it's not working on the device. It's only working on Mac and Windows. I integrated Dave's changes and started tracing the issue, but eventually just gave up as I have other more important things to do for now.Please let us know if you find the problem.
Thanks,
#10
GG can you please release a hotfix for this while we wait for the final 1.3?
10/28/2009 (5:51 am)
Hey everyone. I just spent the whole day trying to get onMouseDragged on 1.3 beta to work but with no luck. Does anyone have a fix for this?GG can you please release a hotfix for this while we wait for the final 1.3?
#11
10/28/2009 (12:12 pm)
use ITGB 1.1 / 1.2 and integrate the multitouch resources, will at the time offer a much more stable base to work with
#12
onMouseDragged won't work properly with my code changes. Using the code that already existed and worked, my code does a onMouseDown check on every event pass of the system. This is because of the way that the iPhone detects touches - it does not detect constant touches, it only detects changes. So, without rewriting large portions of the iTGB input system from scratch, the cleanest way I could find to fix the issues was to route things through onMouseDown on each event.
So, that said, you most likely will have problems with onMouseDragged when working with the actual iPhone device. What you will want to do is either crack into the engine code and implement my changes to work with onMouseDragged, or if you don't want to mess with the engine you should be able to implement a simple state check to the object in question, then update it with the onMouseDown and onMouseUp events (however you gotta watch those, as I found that iTGB did not keep a clean standard with those, so not all objects receive an onMouseDown and onMouseUp callback. If that's the case for your objects, and you don't want to / can't fix it in the engine code, then implement it in the onUpdate method of the object).
10/28/2009 (1:07 pm)
Okay. Let me try reposting from my previous totally incoherent response...onMouseDragged won't work properly with my code changes. Using the code that already existed and worked, my code does a onMouseDown check on every event pass of the system. This is because of the way that the iPhone detects touches - it does not detect constant touches, it only detects changes. So, without rewriting large portions of the iTGB input system from scratch, the cleanest way I could find to fix the issues was to route things through onMouseDown on each event.
So, that said, you most likely will have problems with onMouseDragged when working with the actual iPhone device. What you will want to do is either crack into the engine code and implement my changes to work with onMouseDragged, or if you don't want to mess with the engine you should be able to implement a simple state check to the object in question, then update it with the onMouseDown and onMouseUp events (however you gotta watch those, as I found that iTGB did not keep a clean standard with those, so not all objects receive an onMouseDown and onMouseUp callback. If that's the case for your objects, and you don't want to / can't fix it in the engine code, then implement it in the onUpdate method of the object).
#13
10/28/2009 (1:41 pm)
Hey thanks for the guidance, Dave! Going to look into it tonight.
#14
10/28/2009 (4:34 pm)
Hmm I must not of implemented your changes correctly Dave because the onMouseDragged worked correctly for me after making them. Of course I didn't actually use multi-touch so who knows if I integrated your change correctly. I use the drag feature fairly extensively in my game.
#15
10/28/2009 (6:51 pm)
Hey Brett. So drag works for you in 1.3 beta after implementing Dave's changes? I've also implemented Dave's changes (thanks dave!) but onMouseDragged still doesn't work. I am not using any multi-touch features either.
#16
10/28/2009 (8:31 pm)
I must of not implemented it correctly Johnny, but yes onMouseDragged is working correctly. If you just use the Base 1.2 code base then it should work.
Torque Owner Zilla