Detect whether the touch points over objects or not
Posted: 12 May 2008 07:31 PM   [ Ignore ]
New Member
Rank
Total Posts:  5
Joined  2008-04-21

Dear all!

How can we detect whether the touch points sent from OSC to flash are considered “over” the objects or not?

I know that the photo app has this feature. But I need someone to point it out. Thank you.

Regards,

gatotkaca

Profile
 
 
Posted: 12 May 2008 09:27 PM   [ Ignore ]   [ # 1 ]
Jr. Member
Avatar
RankRank
Total Posts:  47
Joined  2007-12-24

TouchEvent acts as a MouseEvent; so if you want to detect a touch point over an specific display object just add a listener as follows:

(before you should have initialized your TUIO connection
//

then…

//

mySprite.addEventListener(TouchEvent.MOUSE_DOWN, touchHandler);

//
...then

//

function touchHandler(e:TouchEvent){

}

 Signature 

--
http://www.multitouch-barcelona.com

Profile