Hey
I wanna add a background music when you are in the main menu but somehow it just wont play the sound. I added the file to the sounds folder and even tried it to play when an action is done but both didnt work
best
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class MainMenu here. * * @author (your name) * @version (a version number or a date) */ public class MainMenu extends World { private static final GreenfootSound intro = new GreenfootSound("intro.wav"); /** * Constructor for objects of class MainMenu. * */ public MainMenu() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(600, 400, 1); intro.playLoop(); addObject(new playButton(), 99, 111); addObject(new creditsButton(), 74, 383); prepare(); } /** * Prepare the world for the start of the program. * That is: create the initial objects and add them to the world. */ private void prepare() { logo logo = new logo(); addObject(logo,113,37); } }