Page 1 of 1

help with flushevents on ios or best suggestions

Posted: Sat Oct 29, 2011 10:17 am
by kev
hi,

I am working on an ipad app right now. At the beginning, the instructional direction will be given. I don't want the users to touch the button to move to the next card during the direction.

Here is what I have done:

The script of the card:

Code: Select all

on opencard
play (specialfolderpath("engine") & "/start.aiff")
wait until the sound is done
put flushEvents("mouseUp") into temp
end opencard
The script of the button:

Code: Select all

on mouseup
go to card 7
put flushEvents("mouseUp") into temp
end mouseup
With this code, the button did not work during the direction. However, if I clicked the button during the direction, after the sound is done, it automatically went to card 7.

I searched the forum, and tried what Klaus suggested in a similar situation:

set a nonmouseclicks first

on the card

Code: Select all

on opencard
 insert script of btn "nonmouseclicks" of cd 3 into front
play (specialfolderpath("engine") & "/start.aiff")
wait until the sound is done
remove script of btn "nonmouseclicks" of cd 3 from front
end opencard
However, the same problem happened. I also tried disable/ enable the button, but still cannot solve the problem.

Can anyone here help me?

Thank you.

Kev

Re: help with flushevents on ios or best suggestions

Posted: Sat Oct 29, 2011 10:39 am
by Dixie
Hi...

Instead of using 'flushEvents', use 'iphoneClearTouches' ... as it says in the 'release notes'
'Note that this also cancels any existing mouse or touch sequences, meaning that you (nor the engine) will not receive a mouseUp, mouseRelease, touchEnd or touchCancel message for any current interactions.'
be well

Dixie