Hello,
I want to add as background of a world a gif. The world is named CreditWorld and here is its code
Thanks.It will only load the 1st frame of the gif!
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class CreditWorld here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class CreditWorld extends World
{
GifImage creditgif = new GifImage("credit.gif");
/**
* Constructor for objects of class CreditWorld.
*
*/
public CreditWorld()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(1000, 600, 1);
backgif();
}
void backgif()
{
setBackground(creditgif.getCurrentImage());
}
}