GIFAnimation

By mjrb4 - uploaded on 2008-9-10      2403 views (135 in the last 7 days)      1 vote (0 in the last 7 days)

Tags: demo with-source animation gif

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.

If you just want GifActor.java without downloading the whole scenario, follow the web site link.

Visit the web page for this scenario.
Open the scenario in Greenfoot.
Download the source for this scenario.


Your browser is ignoring the <APPLET> tag.

Some people who like this scenario: freddy


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


Report this scenario as broken or inappropriate.

A new version of this scenario was uploaded on Thu Sep 11 13:11:22 UTC 2008

A new version of this scenario was uploaded on Thu Sep 11 13:14:03 UTC 2008

mjrb4 writes (on 2008-9-11):

Finally works! :)

A new version of this scenario was uploaded on Thu Sep 11 18:02:29 UTC 2008

A new version of this scenario was uploaded on Sat Sep 13 14:37:04 UTC 2008

A new version of this scenario was uploaded on Sat Sep 13 14:44:42 UTC 2008

mjrb4 writes (on 2008-9-13):

Few improvements:

- Everything is now in the GifActor class so you don't need to worry about adding the other class in seperately.
- Changed the animation (though that's not really an update!)
- Code cleaner - more comments so you should be able to understand what's going on better
- Pause and resume methods added - press "p" to pause and "r" to resume in this example
- getImages() method added, this will return a list of all the greenfoot images in use.

freddy writes (on 2008-10-22):

it's real cool and it's confusing!

 

LordMindless writes (on 2010-2-14):

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

MathManiac writes (on 2010-3-14):

3-D

See all comments for this scenario.



If you want to leave a comment on this scenario, you must first log in.


The Greenfoot Network:  Greenfoot.org    Greenfoot Gallery   Greenfoot-Discuss

Our sponsors:

University of Kent Deakin University Sun Microsystems