This content has been marked as final.
Show 4 replies
-
1. Re: sequence of images, adding loop to keyboard event?
moccamaximum Aug 29, 2013 2:17 AM (in response to vari25)function keyPressed(event:KeyboardEvent):void
{
if (event.keyCode == 39)
{
if(images_mc.currentFrame<images_mc.totalframes){
images_mc.gotoAndStop(images_mc.currentFrame + 1);
}
else{
images_mc.gotoAndStop(1);
}
else if (event.keyCode==37)
{
if(images_mc.currentFrame>1){
images_mc.gotoAndStop(images_mc.currentFrame - 1);
}
else{
images_mc.gotoAndStop(images_mc.totalFrames);
}
}
}
-
2. Re: sequence of images, adding loop to keyboard event?
vari25 Aug 29, 2013 4:46 AM (in response to moccamaximum)Scene 1, Layer 'Layer 2', Frame 1, Line 95 1083: Syntax error: else is unexpected.
else if (event.keyCode==37)
why could it be??
Thank u.
-
3. Re: sequence of images, adding loop to keyboard event?
moccamaximum Aug 29, 2013 4:48 AM (in response to vari25)there is a brace missing:
else{
images_mc.gotoAndStop(1);
}
}
-
4. Re: sequence of images, adding loop to keyboard event?
vari25 Aug 29, 2013 4:56 AM (in response to moccamaximum)Thank You very much.

