Everything is peachy until I got to the portion where it wants me to change the volume in 10.48. Represents audio that can be played in Greenfoot. It wants me to create a kind of mp3 player thingy. Background music also starts when it runs and continues as the game plays. This utility class provides methods to control the simulation and interact with the system. I have a subclass of world that is my start page and it switches to the game world (called 'MyWorld') when the user hits the space button. Pada part 4 ini kita belajar bagaimana cara memberi music atau backsound pada sebuah game. Whenever I try and put in a sound effect into my game, I get a looping terminal window until I remove the lines: private GreenfootSound footstep footstep new GreenfootSound('footsteps.mp3') All it ponts me to is this line, and the world constructor. An Actor is an object that exists in the Greenfoot world. I'm not sure if I did something wrong with my sound file, or it's something else. Jika di part3, Kita sudah belajar tentang bagaimana cara menggerakkan objek dengan keyboard dan mouse menggunakan greenfoot. It could be something like this: GreenfootSound gfs new GreenfootSound (soundFiles i+'.mp3') where you can then use gfs.play (), gfs.stop (), or any one of a number of object methods in the GreenfootSound class. Scenarios Tutorial 4: Saving the World, Making and Playing Sound This tutorial will explain how to initialise the world with actors, as well as how to play and record sounds. I was working on a new game, when I got this exception:Įxception in thread "SoundStream:file:/E:/Gebruikers/Sven/Programmeren/Greenfoot/Wolfenstein/sounds/backgroundSongs/backgroundSong1.MP3" : 580Īt javazoom.jl._decode(LayerIIIDecoder.java:795)Īt javazoom.jl.(LayerIIIDecoder.java:278)Īt javazoom.jl.(LayerIIIDecoder.java:219)Īt javazoom.jl.(Decoder.java:147)Īt (Mp3AudioInputStream.java:230)Īt (SoundStream.java:302) The GreenfootSound constructor needs a string representing the full filename of the sound file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |