Create the user variable v_entry with a default value of 0, that will be used to count which entry on the slide it is."So you want everything to be done with the On Enter action. I learn something every day with this program. If you have ever found adding sound into Greenfoot difficult then this short video will give you the confidence you need. If you ever want to pause/stop the sound, you should create a GreenfootSound object and keep a reference to it. I didn't realise that I had to remove the audio from the slide and just keep it in the advanced action. Is there a way to make this sound plays only once if I keep the key is pressed Track the state of the key. The parameter has to be a String: aySound ('Megalovania.mp3') The method name doesnt represent what it does, though. the issue is that as it is constantly checking if my mouse is there, it is constantly playing the sound while the mouse is there as opposed to only playing it once. as you mouse of the options, a sound is played. obviously I've taken something out of context. 7 So i am programming a screen in which there are three options to select. I got the "IF 1 is equal to 1" from your original correct answer which I've copied below. Sometimes I get lucky, sometimes just frustrated but always lost! Do a search for the following string within the class: 'GreenfootSound music' If you find it more than once, then you problem is probably that you have an instance field AND a local field with the same name for the same type object however, the one that is playing is not the one you are checking. GreenfootSound song new GreenfootSound ( 'song. You are correct that I need some advanced action instruction. Im stuck with the following problem: I have a MainmenuWorld, where I start playing a sound named 'song' in a loop. Presentation on theme: "Chapter 10: Creating Images and Sound"- Presentation transcript:īruce Chittenden (modified by Jeff Goldstein)Ģ 10.1 Preparation In contrast to previous chapters, we will not build a complete scenario in this chapter but work through various smaller exercises that illustrate separate techniques that can then be incorporated into a wide variety of different scenarios.ģ Exercise 10.1 Click on Scenarios and Click New Enter a Nameĥ Exercise 10.2 Right Click on World and Click New subclassĦ Name the subclass MyWorld and select a BackgroundĮxercise 10.2 Name the subclass MyWorld and select a Backgroundġ1 Create a Turtle Object and add it to the center of the WorldĮxercise 10.5 public class MyWorld extends World private void shrink() if(getImage().Thanks for your speedy response.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |