I have a GIF that I want to make the background for one of my worlds but it doesn't play the GIF. Does anyone know how to fix this?


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class Win here. * * @author (your name) * @version (a version number or a date) */ public class Win extends World { GifImage myGif = new GifImage( "Fireworks.gif" ); /** * Constructor for objects of class Win. * */ public Win() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super ( 1000 , 650 , 1 ); } public void act() { setImage( myGif.getCurrentImage() ); } } |
1 | showText( "" +Points, 175 , 100 ); |