PDA

View Full Version : Can Apms6 play sound when I click an item in listbox


rooholah
04-19-2006, 07:49 PM
hi everybody...
I want to khnow if it is possible to play a sound when i click an item in listbox
Thank you for your attention

Intrigued
04-19-2006, 08:09 PM
I highly recommend the Search link (in the black strip up above this text, in the window). It really does work well and returns relevant posts.

But, here is one I found doing such:

http://www.indigorose.com/forums/showthread.php?t=1939&highlight=listbox+play+sound

Mina
04-19-2006, 08:23 PM
I highly recommend the Search link (in the black strip up above this text, in the window). It really does work well and returns relevant posts.

But, here is one I found doing such:

http://www.indigorose.com/forums/showthread.php?t=1939&highlight=listbox+play+sound

@ Intrigued --> this post is for ams4, not ams5 or ams6
@ Roohalh --> See: Page Jump Based On Listbox (http://ams.mina-e.com). You can change the Page.Jump actions to Audio.Load

The script should be written in the 'On Select' tab of the listbox object. You could code something like
count = ListBox.GetSelectedCount("ListBox1");
if count == 1 then
selc = ListBox.GetSelected("ListBox1");
elseif count ~= 1 then
message = Dialog.Message("www.mina-e.com", "Please select only one page!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
if selc[1] == 1 then
Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\1.wav", false, false);
elseif selc[1] == 2 then
Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\2.wav", false, false);
elseif selc[1] == 3 then
Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\3.wav", false, false);
elseif selc[1] == 4 then
Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\4.wav", false, false);
elseif selc[1] == 5 then
Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\5.wav", false, false);
end

Intrigued
04-20-2006, 10:16 AM
@ Intrigued --> this post is for ams4, not ams5 or ams6

Good catch, I missed that. But that brings up another point. I could (should have) limited my search to say the AMS 6 forum area.

:yes