This site requires JavaScript, please enable it in your browser!
Greenfoot back
Andriyanto
Andriyanto wrote ...

2012/8/8

Greenfoot.playSound()

Andriyanto Andriyanto

2012/8/8

#
How to stop
1
Greenfoot.playSound("xxxx");?
i make a sound but i don't know how to stop Greenfoot.playSound() when i click button next, can help me?
Andriyanto Andriyanto

2012/8/8

#
i want, when i click button next, so
1
Greenfoot.playSound()
stop..
Builderboy2005 Builderboy2005

2012/8/8

#
You cannot stop a sound once you have started it with Greenfoot.playSound(). You will need to use the GreenfootSound API, you should check it out!
tylers tylers

2012/8/8

#
http://www.greenfoot.org/scenarios/5309 check out the sound class
Andriyanto Andriyanto

2012/8/8

#
Builderboy2005: ok thank you..i try with another method.. tylers. ok thank you..i check it out..
Andriyanto Andriyanto

2012/8/8

#
tylers : sorry in sound class just 1 music, i need more music, so i must make class sound, sound2, sound3. ...?
tylers tylers

2012/8/8

#
are they going to play at the same time?
Zamoht Zamoht

2012/8/9

#
You can use the Greenfoot sound class to play, pause, stop and do more with a sound. Check the API http://www.greenfoot.org/files/javadoc/greenfoot/GreenfootSound.html
Gevater_Tod4711 Gevater_Tod4711

2012/8/20

#
If you have got a reference of the soud you just have to write: SoundName.stop(); or if you just want is to take a break you write: SoundName.pause();
Kirito101 Kirito101

2014/9/24

#
how do you get greenfootSound. It just tells me meathod start() stop() ect. cannot be found as a symbol.
danpost danpost

2014/9/24

#
@Kirito101, please show how you are trying to use those method, including what you are calling those methods on (include how you came about what you are calling them on also). NOTE: click on the 'Posting code? read this!' link below the 'Post a reply' input box before posting any code.
You need to login to post a reply.