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

2015/6/4

How do I stop music initialized in the super class of a world in one of the worlds subclasses

Hello. I am very new to greenfoot and am making a game where I play music starting in a world superclass. I have many subclasses which are all different levels of a game. I have tried everything I could think of to stop the background Music in the subclasses but it only works in the first super class. I tried to use the stopped() method but that did not carry over to the subs which was odd. I also tried to make it so when there are none of a certain object (the character in the game) the music stops because that means it is game over. This did not work very well because every time i paused the game it would play the song again so two songs would then be playing. Does anyone have any clue of what I could do?????? Thank you so much. My project is due friday so the sooner the better
davmac davmac

2015/6/4

#
Start by reading (this). It will help you to ask questions in a way that makes it easier and more likely for people to answer. Especially, point 2 (Don't say you need help "fast") and point 3 (Always include relevant code that you have written).
danpost danpost

2015/6/4

#
You may want to check out the java tutorials starting with the page on Classes. Of particular interest, might the the page called Understanding Class Members.
You need to login to post a reply.