Report as inappropriate.

Small_thumb

mjrb4 presents ...

2008/9/10

GIFAnimation

Similar to mik's AnimatedActor demo, but this time you can just create an animated actor by calling setImage() and providing GifActor with an animated GIF file.

Speeed is no longer solely dependant on the speed of the slider. The animation will always "try" to run at the speed specified in the gif file. So if it's sped up to faster than this, it will still run at the same speed.
If it's slower, then it will just run as fast as it can - it can only update its image as fast as the scenario is running.

UPDATE:
- GifActor now also looks in the images folder for the GIF image (as well as the main folder previously)
- If the image can't be found a better error message is given (before it was just a NPE, now it states it can't find the image.)
- Changed setSimulationSpeed to setSpeed in the source to update it to the "new" API (though it's not that new now!)

If you just want the source of GifActor, see the URL.

6786 views / 32 in the last 7 days

5 votes | 0 in the last 7 days

Tags: demo with-source animation gif

This scenario is a member of: Reusable actors & support classes


open in greenfoot
Your browser is ignoring the <APPLET> tag.
Image_thumbfreddy

2008/10/22

it's real cool and it's confusing!
No_avatar_thumbLordMindless

2010/2/14

Cool. In wich Dimension is this? looks more than 4D.
Math_table_thumbMathManiac

2010/3/14

3-D
No_avatargamemaster123

2010/7/6

hey i like the scenario but you might want to lock the scenario before you export it or people can mess with it and decompile it to get your code
63541_1569440113480_1159787730_1296245_7006399_nAndres

2010/7/6

thats the point... he put this here so people can use his code... and locking the scenario would also lock the speed slider.
Small_thumbmjrb4

2010/7/6

As pointed out above the source is deliberately there so people can have a play around :-)
A new version of this scenario was uploaded on Thu Aug 19 11:22:01 UTC 2010
A new version of this scenario was uploaded on Thu Aug 19 11:26:25 UTC 2010
No_avatar_thumbannekm21

2010/9/17

cool graphiics
Gollum_thumbdordor

2011/12/17

cool

See all comments

Want to leave a comment? You must first log in.

Who likes this?

Gollum_thumb Yoda_thumb Wmg1-01_thumb Rubik_s_cube_thumb Image_thumb