View Single Post
santiago's Avatar
Posts: 518 | Thanked: 334 times | Joined on Mar 2010 @ italy
#18
Originally Posted by kojacker View Post
Ah some good feedback!

At the moment it's just a simple toggle between the two, once those mosquitos start singing they won't stop until the app exits :P The pause functionality could be added quite simply though - santiago would you like to practise your coding?

On the button click you just need to check if that mosquito is currently selected and, if so, to stop playing the sound file and to change the button background to the dark colour.

You might want to introduce a new variable, similar to the new soundFile variable, that remembers if it's the classic, the extreme, or no mosquito currently selected. In each play sound method you'd check this new variable, eg


Something like that will enable your users to pause the sound by re-clicking on the button. Let me know if you try it and it doesn't work, we'll soon fix it

Im interested to hear the results of Nicholes experiment. Fortunately we don't have many mosquitos here so i can't test it myself. if only we could have an app to repel cold weather and rain
i 'm checking thx
do you think that we ve gotta add this function ? when i close the app sound stops to work, for you it plays in loop?
by the way when i click to close the app, it stops playing the sound i thing Pause/Resume is not needed becouse is not a media player made to make mosquitos dancing,,

Last edited by santiago; 2011-05-19 at 13:20.