[Xerte] Problems with key press interaction in Decision icon

Paul Swanson Paul.Swanson at harlandfs.com
Fri Jul 17 22:52:03 BST 2009


Well, I'm still not sure what you meant, but I came up with something
that works. I think the problem was trying to go to the next Decision
icon page directly when onKeyDown was fired by attaching that code to
the event response. It triggered multiple times and caused all of the
decision pages to be executed without pausing. So I changed the
onKeyDown code to just exit the interaction (each with a unique ID),
then followed that with a script icon that sent execution to the next
Decision icon page. Since the interactions have unique IDs (vs. the same
ID for the parent Decision icon) it doesn't matter if the onKeyDown
event fires multiple times, it can only exit the interaction once.

 

Have a great weekend!

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: Friday, July 17, 2009 1:57 PM
To: Xerte discussion list
Subject: RE: [Xerte] Problems with key press interaction in Decision
icon

 

use a normal event response, but listen for rootIcon, onKeyDown.

 

I also had trouble when trying to handle anyIconID.onKeyDown. RootIcon
has some code to make it work - the other icons were problematic for
some reason that I can't recall, and led to the things you describe.

It measn you can only have one listener for onKeyDown, so you might need
some if... then... stuff going on in the response. 

 

________________________________

From: xerte-bounces at lists.nottingham.ac.uk on behalf of Paul Swanson
Sent: Fri 17/07/2009 21:53
To: Xerte discussion list
Subject: RE: [Xerte] Problems with key press interaction in Decision
icon

I don't understand what you mean by don't try and handle it from
individual icons. Should I not use an event response? Do I use a script
icon with if (rootIcon.onKeyDown) { displayPromt.nextPage(); } in a
framework entry pane?

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: Friday, July 17, 2009 1:37 PM
To: Xerte discussion list
Subject: RE: [Xerte] Problems with key press interaction in Decision
icon

 

you should handle rootIcon.onKeyDown, don't try and handle it from
individual icons.

 

________________________________

From: xerte-bounces at lists.nottingham.ac.uk on behalf of Paul Swanson
Sent: Fri 17/07/2009 19:03
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Problems with key press interaction in Decision icon

I'm having problems using an onKeyDown event to move to the next page of
a Decision icon. It works on the first page, but on the second page,
when you press a key, the Decision icon goes wacko and zips instantly
through the rest of the pages and then seems to loop on the icons that
follow the Decision icon. I haven't even put onKeyDown events yet on the
Decision icon pages that zip through - those have timed events (which I
am attempting to change to "press any key to continue" onKeyDown
events).

Properties of my Decision icon:

id: displayPrompts

repeat: all

branch: sequence

pause: 1

erase: 0

eraseOnExit: 0

The keypress interaction is NOT perpetual.

Properties of the event response:

eventName: onKeyDown

icon: rootIcon

erase: 1

exit: 0

Contents of script icon attached to event response:

displayPrompts.nextPage();

Is there some way to set KeyDown to FALSE or something? Any advise
appreciated.

_____________________________ 

 Paul Swanson
 Instructional Designer
 Harland Financial Solutions
 Paul.Swanson at harlandfs.com
_____________________________ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20090717/71a8f9f8/attachment.html


More information about the Xerte mailing list