TUIO events are looped in an interval? 
Posted: 06 June 2008 06:35 AM   [ Ignore ]
New Member
Rank
Total Posts:  8
Joined  2008-01-15

Hi,

I can’t discover who calls, and why all the TouchEventListener-functions are called, every 2 seconds or so. Does anyone have an idea?

Initiating listeners like:

this.addEventListener TouchEvent.MOUSE_DOWNthis.mouseDownHandlerfalse0true );
this.addEventListener TouchEvent.MOUSE_UPthis.mouseUpHandlerfalse0true );
etc.

The functions like:

private function mouseDownHandler event:TouchEvent ):void
{
  
// do stuff
}

And when pressing DOWN with the mouse, and holding it, in the reacTIVision TUIO Simulator, I see that all the functions are called every 2 seconds. I’ve searched around the TUIO classes for an interval or something, but couldn’t find anything. I noticed that the TUIOEvent-class is an extensions of the Flash Event-class, but couldn’t find any info about intervals in this class’ documentation.

It could (logically) be because of the double tapping or longpress option in the TUIOEvent-class, but the pain is that when initiating a startDrag on MOUSE_DOWN, the stopDrag on MOUSE_UP is automatically called 2 seconds later, just when you’re not done with dragging…

BTW, I’m developing in Adobe AIR, and the latest TUIO-classes from subversion.

Profile
 
 
Posted: 06 June 2008 08:52 AM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  63
Joined  2007-03-04

i remember seeing calls to “stopPropagation” of events… perhaps this is not happening in the neighborhood of where the hold interval is set? or things that do this are being overridden such that they keep sending events when they should’ve had a condition to stop at some point? not sure ;/ are you overriding the AS from the project? from what I know of AIR, it should be the same.... at least i thought

Profile
 
 
Posted: 09 June 2008 03:27 AM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  8
Joined  2008-01-15

I’m not overriding/extending the project AS files, and the stopPropagation function is to stop event dispatching calls higher op the chain of DisplayObjects, not to stop looped calls to the listener function in the same class.

So it’s all still pretty weird to me…

But spanx for the pointers!

Profile
 
 
Posted: 09 June 2008 01:18 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  1358
Joined  2007-04-08

Are you sure this isn’t just the TUIO Simulator sending OSC at some given interval?

 Signature 

My Multitouch Blog
My Youtube
Multitouch FAQ - Need Help? Click here!

Profile
 
 
Posted: 10 June 2008 02:48 AM   [ Ignore ]   [ # 4 ]
New Member
Rank
Total Posts:  8
Joined  2008-01-15

Hmm, the simulator must be it then. Can’t find anything otherwise, except for in the TUIOSimulator.as class, which has a Timer-event of one second, but this class isn’t being used when compiling the SWF. But in the fora of the reacTIVision Simulator there’s nothing to be found either on this case (like it’s a default setting purely for reacTIVision or something).

The problem is, I can’t use the FTIR setup to work/test around the simulator, it’s under construction. So the answer calls for a bit of patience and some elbow grease wink

Profile
 
 
Posted: 10 June 2008 09:15 AM   [ Ignore ]   [ # 5 ]
Jr. Member
Avatar
RankRank
Total Posts:  188
Joined  2007-09-13

Yes, the Simulator sends OCS messages in a very different way than Touchlib, including message structure and interval. You can use it, it’s quite convenient, but don’t assume your program will behave the same when you switch to Touchlib. You might need to adjust it, and sometimes the necessary changes are not obvious.

Profile