Two point at the same time press

大家好 想請問一下  我的問題是

當我用一個點 按壓時 他會依照 按壓的持續時間 來增加數量 用enterFrame

但是當我想要 用兩個按鍵時 只能一次點一邊 不能同時點 

因為enterFrame 只能使用Runtime 使得我無法一次同時讓兩邊執行 增加數量的函式

請問有別的方法 可以完成 兩點同時持續按壓嗎

Hello everybody , I have a question

When I press with a point, the point will increase the number with enterFrame according to the duration of the press

but when I want to use two point,only one point can not point at the same time

Because the enterFrame can only use Runtime so that I can not at the same time on both sides of the implementation of the increase in the number of functions

Is there any other way to finish pressing two points at the same time?

Thank you for listening

Hi

Firstly you need to enable multi touch which is easy with this code

system.activate( "multitouch" )

Then you will need to track multiple touch points… in your touch handler you count phase = “began” and phase = “ended”.  If you get a began and then another began (without an end) you know that you have two touch points, etc.

Thank you much. 

I suddenly found that I forgot to add multi touch…

Thanks :))

Hi

Firstly you need to enable multi touch which is easy with this code

system.activate( "multitouch" )

Then you will need to track multiple touch points… in your touch handler you count phase = “began” and phase = “ended”.  If you get a began and then another began (without an end) you know that you have two touch points, etc.

Thank you much. 

I suddenly found that I forgot to add multi touch…

Thanks :))