[Xerte] Re: Another SWF problem in Xerte

Pat Lockley patrick.lockley at googlemail.com
Sat Jul 16 12:13:29 BST 2011


You need to give the swf focus

On 16/07/2011 12:03, Deborah Delin wrote:
> Hi,
> You guys have been great in helping me solve my SWF/Xerte glitches. 
>  Hope you might know the answer to this one.
>
> 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.
>
> Many thanks for your help.
>
> Deborah
>
> onClipEvent(load){
> speed = 7;
> jspeed = 0;
> jumping = false;
> startY = this._y;
> }
> onClipEvent(enterFrame){
> if(jumping){
> this._y += jspeed;
> jspeed++;
> if(this._y > startY){
> this._y = startY;
> jumping=false;
> }
> }else if(Key.isDown(Key.SPACE)){
> jumping = true;
> jspeed=-20;
> }
> if(Key.isDown(Key.RIGHT)) this._x += speed;
> if(Key.isDown(Key.LEFT)) this._x -= speed;
> }
>
> This message and any attachment are intended solely for the addressee 
> and may contain confidential information. If you have received this 
> message in error, please send it back to me, and immediately delete 
> it. Please do not use, copy or disclose the information contained in 
> this message or in any attachment. Any views or opinions expressed by 
> the author of this email do not necessarily reflect the views of the 
> University of Nottingham.
>
> This message has been checked for viruses but the contents of an 
> attachment may still contain software viruses which could damage your 
> computer system: you are advised to perform your own checks. Email 
> communications with the University of Nottingham may be monitored as 
> permitted by UK legislation.
>
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110716/e1081fd6/attachment-0001.html>


More information about the Xerte mailing list