PennController for IBEX › Forums › Support › Self Paced Reading Timed Reminder › Reply To: Self Paced Reading Timed Reminder
November 29, 2021 at 12:55 pm
#7537
Jeremy
Keymaster
Hi,
Yes, you can use a Key element and its callback
command to (re)start a Timer element whenever the space bar is pressed, and display the message after that timer has elapsed:
newController("DashedSentence", {s: "Hello world, bye Earth"}).print()
,
newText("reminder", "<em>Press Space to see the next word</em>").center().print()
,
newTimer("reminder timer",2000)
,
newKey(" ")
.callback(
getTimer("reminder timer").stop(),
getText("reminder").hidden(),
getTimer("reminder timer").start().wait(),
getText("reminder").visible()
)
,
getController("DashedSentence").wait().remove()
,
getText("reminder").remove()
,
newButton("Continue")
.print()
.wait()
Jeremy