View Full Version : Help with function of ListBox???
Ed Stanley
02-03-2006, 03:31 PM
If I understand correctly, List Box can be used to compile a list of audio tracks from which the user can select for listening. So far, I have not been able to get it to work in this manner. In the List Box Properties, under the Settings Tab: Item text: I listed the title of the track, i.e., for Item 1, Genesis 1.
In the Data column I used Audio.Load to select the source of the track file. (For this trial effort I listed 8 items.) Then in the Script Tab, I selected the action, i.e.: 01 Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\0001 Genesis 1.wav", true, false); thru: 08 Audio.Load
CHANNEL_NARRATION, "AutoPlay\\Audio\\0008 Genesis 8.wav", true, false);
Then when I selected Preview, and clicked on the first track in the list box, it was Genesis 8 that began playing instead of Genesis 1, and no matter which track title I selected only "Genesis 8" would play.
What am I missing or doing wrong here? How do I set it up to play the correct track that matches the title in the list?:huh
Thanks for any suggestions.
Ed Stanley
playmenow
02-04-2006, 03:37 AM
Yeah, I know. I tried to make a playlist for PlayMeNow using listbox...i think you should forget about it...Worm should make a playlist plug-in.
Corey
02-04-2006, 04:13 AM
Actually it's pretty easy to make clickable lists which launch files. It's just a matter of getting used to how the listbox works. And the good news is that it's pretty easy. Please download the attached file here and take a look Ed. It's an example I put together for you which demonstrates one way of reacting to clicks within a list box on a per item basis.
In this case I activated a dialog when you select an item but you could just as easily set it to launch a file. The main thing to note is how it works, basically with the listbox we figure out which item they've clicked and then we can get the item's corresponding text/data and react accordingly. :yes
Take a look at the example and let me know if you need me to break it down some more. We'll take it from there. One way or another we'll get you set up with a working menu. And whatever you do, don't get overwhelmed with the scripting, just hang in there and I guarantee we'll get you going. :)
stickck
02-04-2006, 04:49 AM
Here you go guys! these two samples will do exactly what you want.
the first one will use the Audio.Load() and the second one uses the WMP plugin to play the audio files.
http://www.indigorose.com/forums/showpost.php?p=73937&postcount=5
http://www.indigorose.com/forums/showpost.php?p=73958&postcount=7
And whatever you do, don't get overwhelmed with the scripting, just hang in there and I guarantee we'll get you going. :)
I was like that when i first started using AMS. Now I just wish other programs were just as easy to use as AMS.
Hope this helps!
Chris
Corey
02-05-2006, 09:57 PM
Hey what happened to my attachment? Weird... Anyhow I see Chris has it covered so it's all good. Still, that's odd. Not odd enough to justify a Leonard Nimoy narration or anything, but odd nonetheless.
I was like that when i first started using AMS.
That's good testimony too because Chris is a textbook case of a guy who went from zero to 60 in the flash of an eye. One day he was scratching his head and the very next he was posting help files for someone else. Hee. :D
stickck
02-06-2006, 08:10 AM
True...True...
Here's my first post. Don't laugh to hard but I couldn't even figure out where to change some text loaded in a Label object!:o
http://www.indigorose.com/forums/showthread.php?t=10307
Thanks Corey!
Chris
Ed Stanley
02-06-2006, 09:17 AM
Thanks for the input, gentlemen. As soon as I get a chance, probably this afternoon, I'll try again to figure this all out, and get back to you with my results.
Ed Stanley:)
Ed Stanley
02-06-2006, 02:43 PM
Here you go guys! these two samples will do exactly what you want.
the first one will use the Audio.Load() and the second one uses the WMP plugin to play the audio files.
http://www.indigorose.com/forums/showpost.php?p=73937&postcount=5
http://www.indigorose.com/forums/showpost.php?p=73958&postcount=7
Chris
I could open the first link, but didn't see how you used Audio.Load(). When I copied your pattern into my project, i.e., selecting my autoplay file source for the data column in "Settings" (AutoPlay\Audio\0001 Genesis 1.wav), and then just as you did in "Script" , I put "dbclick1()" (without the quotes), and when I previewed and selected one of my titles in the listbox an error message appeared: On Select, line 1: attempt to call global 'dbclick1' (a nil value).
I've tried everything I can think of to try and still either get no playback or the same result as my first attempt described in my first message that started this thread. (The second link about WMP plugin would not download.
Any additional suggestions?
Ed Stanley
stickck
02-06-2006, 04:29 PM
Can you post a sample? it should be something simple.
Chris
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.