![]() ![]() If(Greenfoot. But it is not working as expected, the stop doesn't work at all, and the sound repeat it self if I click start again. would should happen is: If I click on the image it should change the image and start or stop the sound. * Act - do whatever the Player wants to do. Greenfoot provides a GreenfootSound class to help easily manage audio. Hi, I am trying to create a sound control. Private GreenfootImage run4l = new GreenfootImage("run4l.png") Private GreenfootImage run3l = new GreenfootImage("run3l.png") Private GreenfootImage run2l = new GreenfootImage("run2l.png") Im trying to make a song play when I click on an image. Private GreenfootImage run1l = new GreenfootImage("run1l.png") Private GreenfootImage run4r = new GreenfootImage("run4r.png") The exercise is a very simple one: make 5 smileys appear in the world and have them play a sound when you click on them (each emoticon has its own sound). Private GreenfootImage run3r = new GreenfootImage("run3r.png") Private GreenfootImage run2r = new GreenfootImage("run2r.png") If not, there is a problem with your microphone - try googling to get help with that. You should see a green wave, and when you press play you should hear your noise played back to you. You have aysound ('fallenthing.wav'), It should be aySound ('fallenthing. Private GreenfootImage run1r = new GreenfootImage("run1r.png") Press the record button and speak (or scrunch an empty food packet, or whatever), then press stop. Private int shootingCounter = 20 // Delay shooting Private int direction = 1 // 1 = right and -1 = left * Write a description of class Player here. * the 'Act' or 'Run' button gets pressed in the environment.Īctor walls = getOneIntersectingObject(Platform.class) Īctor actor = getOneObjectAtOffset(0,0, clss) Īnd here is the current Player code: import greenfoot.* // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) * Act - do whatever the ShootingManager wants to do. ![]() Public class ShootingManager extends Actor * Write a description of class ShootingManager here. Where would depend on when you wanted it to start. 4 Answers Sorted by: 3 Its not that easy to play a sound in HTML. This is our "ShootingManager" class from today: import greenfoot.* // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) Today we are adding "shooting" to our game. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |