I have a working animated gif in Greenfoot. Now I want to control it with a key so that the full animation just 'runs' once when that key is pressed.
I tried:
But when I run it, the gif does nothing or it just moves a bit very very shortly but not fully. It must have something to do with the length of every act.
Any help would be appreciated.
Thanks!
1 2 3 | if (Greenfoot.isKeyDown( " " )){ setImage(gifImage.getCurrentImage()); } |