<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 6/2/2014 10:29 AM, JOHNSON JULIE M.
wrote:<br>
</div>
<blockquote
cite="mid:d33bafd0201e4a99823351bb805d4cc8@EXCAS2.williamsvillek12.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">I do not want the user to be able to press
the arrow buttons on the keyboard to start a race between two
objects until the countdown is finished. I tried a delay in
the event listener but it did not work.
<o:p></o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader">Perhaps use a boolean
variable to track whether the countdown is finished. Declare a
property variable for the Scene class and set it to false... see
image here:<br>
</fieldset>
</blockquote>
<br>
<blockquote
cite="mid:d33bafd0201e4a99823351bb805d4cc8@EXCAS2.williamsvillek12.net"
type="cite">
<fieldset class="mimeAttachmentHeader"> <img
alt="countdownComplete variable"
src="cid:part1.08060307.05040008@andrew.cmu.edu" height="335"
width="323"><br>
</fieldset>
</blockquote>
Then use the variable to prevent the arrowKeyPressed event
listener from taking action until the boolean variable becomes true,
as shown here:<br>
<br>
<img alt="boolean must be true or arrow press is ignored"
src="cid:part2.06020405.03020506@andrew.cmu.edu" height="226"
width="513"><br>
<br>
Of course, you will need to set the variable to true when your
countdown is completed. Then, the arrow keys will become active.<br>
<br>
<blockquote
cite="mid:d33bafd0201e4a99823351bb805d4cc8@EXCAS2.williamsvillek12.net"
type="cite"><br>
<pre wrap="">_______________________________________________
alice-teachers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:alice-teachers@lists.andrew.cmu.edu">alice-teachers@lists.andrew.cmu.edu</a>
<a class="moz-txt-link-freetext" href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a>
</pre>
</blockquote>
<br>
</body>
</html>