开发者

event defaults to flash.events and not external libaray in flash

开发者 https://www.devze.com 2023-01-30 23:06 出处:网络
SO i am trying to access the TOUCH_DOWN and TOUCH_UP 开发者_StackOverflowconstants of the tuio library through the TouchEvent method however flash keeps defaulting the TouchEvent method to the flash.e

SO i am trying to access the TOUCH_DOWN and TOUCH_UP 开发者_StackOverflowconstants of the tuio library through the TouchEvent method however flash keeps defaulting the TouchEvent method to the flash.events TouchEvent and i can't figure out why. has anyone else had this problem maybe with another external library?


Did you mean "defaulting" at compile time, or defaulting at runtime?

Try using the fully qualified name of the TouchEvent class, like so: org.tuio.TouchEvent.TOUCH_DOWN, or explicitly use import org.tuio.TouchEvent;.

Also, the tuio event will only be dispatched by an org.tuio.TouchContainer.

And this I can only guess, since I don't know the source code, but if the constants use the same String value (i.e. "touchDown") as flash.events.TouchEvent, listener methods for both events will be triggered at runtime. So you can always only listen to one event with the same String value at a time.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号