New event manager in Cocos2d-Html5 v3.0

Thanks! So you should update your document about the new EventManager

Thank you for noticing. @longyangxi

I will update them soon.

Hi Lu Sir

小弟愚笨,向您讨教一下…

是否有 “touchDown” or “touchPress” 事件?

在 cc.EventListener.TOUCH_ONE_BY_ONE 监听中.

经debug 观察 当 手指or鼠标 按下时 TouchBegan 只会执行一次,如果没有任何移动的情况下 touchMove不会被执行,手指抬起后 执行 touchEnd

我需要实现当手指按下时记录时间 超过一定时间,被按下的节点响应业务逻辑,就像在手机上拖动图标的效果.

请教这部分应如何实现.

ps:当然,用move是可以实现的,因为当用户按下超过一定时间,就意味着用户需要进行拖动,所以肯定会产生move事件.但这样用户的体验不友好…

感谢…:slight_smile:

Hi @jiwu_ma,

I think you can add a timer when the TouchBegan called, this timer is used by recording how long the TouchBegan called, if the time is greater than your setting time, you can execute your logic, and if touchMove is called, you can remove this timer.

Hopes to help
David

i was created a cc.MenuItemSprite.create() when i want to remove this node,how can i remove the listener manually?

@evolution
Did you add the menuitemSprite to a cc.Menu object?
If you added it to cc.Menu, please use removeFromParent,

By the way, the listener is inside cc.Menu, cc.MenuItemSprite hasn’t listener.

Best regards
David

How can i reference any other variable from within the eventlistener , Can you please view this question :