<div dir="ltr"><font color="#000066"><font face="verdana,sans-serif">Hi, <br clear="all"></font></font><div><font class="Apple-style-span" color="#000066" face="verdana, sans-serif">You guys have been great in helping me solve my SWF/Xerte glitches. Hope you might know the answer to this one.<br>
</font></div><div><font class="Apple-style-span" color="#000066" face="verdana, sans-serif"><br></font>
</div><div><font class="Apple-style-span" color="#000066" face="verdana, sans-serif">I have a little game where a figure is activated by the keyboard arrows using the code below. In Xerte, the figure only becomes reactive after one clicks anywhere on the SWF. Outside of Xerte it reacts as it should do. File size is 150 kb. </font></div>
<div><font class="Apple-style-span" color="#000066" face="verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" color="#000066" face="verdana, sans-serif">Many thanks for your help.</font></div><div><font class="Apple-style-span" color="#000066" face="verdana, sans-serif"><br>
</font></div><div><font class="Apple-style-span" color="#000066" face="verdana, sans-serif">Deborah</font></div><div><font class="Apple-style-span" color="#000066" face="verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" color="#000066" face="verdana, sans-serif"><div>
onClipEvent(load){</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>speed = 7;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>jspeed = 0;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>jumping = false;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>startY = this._y;</div><div>}</div><div>onClipEvent(enterFrame){</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if(jumping){</div><div>
<span class="Apple-tab-span" style="white-space:pre"> </span>this._y += jspeed;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>jspeed++;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if(this._y > startY){</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>this._y = startY;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>jumping=false;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}else if(Key.isDown(Key.SPACE)){</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>jumping = true;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>jspeed=-20;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if(Key.isDown(Key.RIGHT)) this._x += speed;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if(Key.isDown(Key.LEFT)) this._x -= speed;</div>
<div>}</div></font></div></div>