Want to check more than 1 checkbox.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 63
- Joined: Sat Dec 22, 2012 3:01 am
Want to check more than 1 checkbox.
I have four checkboxes and want to be able to check more than one. If I do this the
system responds as if only the last one is checked. How can I get around this.
Thanks.
system responds as if only the last one is checked. How can I get around this.
Thanks.
Re: Want to check more than 1 checkbox.
Are they checkboxes or radio buttons? If they're checkboxes they should all be checkable individually. If they're radio buttons, and in a group, only 1 can be selected at a time. If they're outside a group (or in different groups) they can be selected individually. If you're using radio buttons inside a group and you wish them to behave separately, open the property inspector for the group and take the check out of the radioBehavior button. (might be called something slightly different depending on your preferences)
If you're speaking of checkboxes, and they aren't behaving as expected, can you explain how you set them up (in a group, out of group, what scripts are involved) so that its easier to help?
If you're speaking of checkboxes, and they aren't behaving as expected, can you explain how you set them up (in a group, out of group, what scripts are involved) so that its easier to help?
-
- Posts: 63
- Joined: Sat Dec 22, 2012 3:01 am
Re: Want to check more than 1 checkbox.
Hi, thanks, what I've done is set up 4 checkboxes (not grouped) and want to perform a sound the boxes have
been checked. What I'm getting is only 1 sound even if I click 2 or more boxes. The script is
if the hilite of button "EnglishLang"is true then
put specialFolderPath("engine") & "/soundwavs/Bell.mp3" into tSndPath
play tSndPath
end if
if the hilite of button "FrenchLang" is true then
put specialFolderPath("engine") & "/soundwavs/Bugle.mp3" into tSndPath
play tSndPath
end if
if the hilite of button "SpanishLang" is true then
put specialFolderPath("engine") & "/soundwavs/Bird.mp3" into tSndPath
play tSndPath
end if
if the hilite of button "IndonesianLang" is true then
put specialFolderPath("engine") & "/soundwavs/Banjo.mp3" into tSndPath
play tSndPath
end if
Regards
been checked. What I'm getting is only 1 sound even if I click 2 or more boxes. The script is
if the hilite of button "EnglishLang"is true then
put specialFolderPath("engine") & "/soundwavs/Bell.mp3" into tSndPath
play tSndPath
end if
if the hilite of button "FrenchLang" is true then
put specialFolderPath("engine") & "/soundwavs/Bugle.mp3" into tSndPath
play tSndPath
end if
if the hilite of button "SpanishLang" is true then
put specialFolderPath("engine") & "/soundwavs/Bird.mp3" into tSndPath
play tSndPath
end if
if the hilite of button "IndonesianLang" is true then
put specialFolderPath("engine") & "/soundwavs/Banjo.mp3" into tSndPath
play tSndPath
end if
Regards
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Want to check more than 1 checkbox.
Hi,
Are you asking to play Bell and Bugle at the same time? Or any combinations of your sounds?
Because that is what you've asked, but not what you coded.
Simon
Are you asking to play Bell and Bugle at the same time? Or any combinations of your sounds?
Because that is what you've asked, but not what you coded.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 63
- Joined: Sat Dec 22, 2012 3:01 am
Re: Want to check more than 1 checkbox.
Hi Simon yes I want all the selected sounds to play in sequence
But somehow they don't - just 1 plays
But somehow they don't - just 1 plays
Re: Want to check more than 1 checkbox.
Still no look into the "Release Notes"?
----------------------------------------------------------
play soundFile [ looping ]
Executing such a command will first stop any currently playing sound, and then attempt to load the given sound file.
----------------------------------------------------------
"play" will one play ONE sound at a time, and that is the reason why you will only hear one sound and that is the one
of the last checked checkbox!
You could "collect" all sounds in a list, "queue" them and then use "mobilePlaySoundOnChannel sound, channel, type"
to play them one after another.
----------------------------------------------------------
play soundFile [ looping ]
Executing such a command will first stop any currently playing sound, and then attempt to load the given sound file.
----------------------------------------------------------
"play" will one play ONE sound at a time, and that is the reason why you will only hear one sound and that is the one
of the last checked checkbox!
You could "collect" all sounds in a list, "queue" them and then use "mobilePlaySoundOnChannel sound, channel, type"
to play them one after another.
-
- Posts: 63
- Joined: Sat Dec 22, 2012 3:01 am
Re: Want to check more than 1 checkbox.
I am new to Livecode. What is the easiest way to play four MP3 sound files one after the next
perhaps with a 1second interval between them?
The sounds as follows play fine individually:
put specialFolderPath("engine") & "/soundwavs/Bird.mp3" into tSndPath
play tSndPath
put specialFolderPath("engine") & "/soundwavs/Cat.mp3" into tSndPath
play tSndPath
put specialFolderPath("engine") & "/soundwavs/Dog.mp3" into tSndPath
play tSndPath
put specialFolderPath("engine") & "/soundwavs/Elephant.mp3" into tSndPath
play tSndPath
but I can't get them to run in sequence.
Thanks
perhaps with a 1second interval between them?
The sounds as follows play fine individually:
put specialFolderPath("engine") & "/soundwavs/Bird.mp3" into tSndPath
play tSndPath
put specialFolderPath("engine") & "/soundwavs/Cat.mp3" into tSndPath
play tSndPath
put specialFolderPath("engine") & "/soundwavs/Dog.mp3" into tSndPath
play tSndPath
put specialFolderPath("engine") & "/soundwavs/Elephant.mp3" into tSndPath
play tSndPath
but I can't get them to run in sequence.
Thanks
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Want to check more than 1 checkbox.
You just need the playStopped message.
Simon
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Want to check more than 1 checkbox.
The answer can be found in the "Android/iOS Release Notes" under "Basic sound playback support"!
Did I mention already that the "Release Notes" are better than their reputation?
So it is not a bad idea to look up one thing or another there...
Code: Select all
...
repeat for each item tSound in "Bird.mp1,Cat.mp2,Toad.mp3,Dodo.mp4,Archeopterix.mp5"
put specialFolderPath("engine") & "/soundwavs/" & tSound) into tSndPath
play tSndPath
## !!!
wait until the sound = "done"
end repeat
...
So it is not a bad idea to look up one thing or another there...