<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</style>
<meta content="MSHTML 6.00.6000.17092" name="GENERATOR">
<style id="owaTempEditStyle"></style><style title="owaParaStyle"><!--P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
--></style>
</head>
<body class="hmmessage" ocsi="x">
<div style="FONT-SIZE: 13px; COLOR: #000000; DIRECTION: ltr; FONT-FAMILY: Tahoma">
<div>handle onKeyDown for the text field and do</div>
<div><font face="tahoma"></font>&nbsp;</div>
<div><font face="tahoma">if (Key.isDown(Key.ENTER))</font></div>
<div><font face="tahoma">{</font></div>
<div><font face="tahoma">&nbsp; //add one to your count</font></div>
<div><font face="tahoma">}</font></div>
<div><font face="tahoma"></font>&nbsp;</div>
<div><font face="tahoma">You' ll have to handle the rest of the response in the event handler.</font></div>
<div><font face="tahoma"></font>&nbsp;</div>
<div><font face="tahoma">Should work I think.</font></div>
<div dir="ltr"><font face="Tahoma" color="#000000" size="2"></font>&nbsp;</div>
<div id="divRpF306655" style="DIRECTION: ltr">
<hr tabindex="-1">
<font face="Tahoma" color="#000000" size="2"><b>From:</b> xerte-bounces@lists.nottingham.ac.uk [xerte-bounces@lists.nottingham.ac.uk] On Behalf Of Dave Burnett [d_b_burnett@hotmail.com]<br>
<b>Sent:</b> 01 December 2010 16:56<br>
<b>To:</b> Xerte list<br>
<b>Subject:</b> [Xerte] Flash - that way lies madness<br>
</font><br>
</div>
<div></div>
<div><br>
Regular text entry set to multi-line.<br>
<br>
Goal: determine when user has hit return 3 times.<br>
<br>
debug:<br>
debug('length ' &#43; icon.parentNode.clip().text.length);<br>
debug('split ' &#43; icon.parentNode.clip().text.split(chr(13)).length);<br>
<br>
If I simply hit return 3 times:<br>
<br>
length 1<br>
split 2<br>
length 2<br>
split 3<br>
length 3<br>
split 4<br>
<br>
// as expected.<br>
<br>
If I type a letter each time, then hit return each of those 3 times:<br>
<br>
length 1<br>
split 1<br>
length 3<br>
split 2<br>
length 5<br>
split 3<br>
<br>
// it will not register that 3rd return *until I type a character* on that 4th line.<br>
<br>
<br>
sigh.<br>
Any ideas?<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
&nbsp;<br>
</div>
</div>
</body>
</html>