PDA

View Full Version : progress bar component


loach
10-25-2006, 02:08 AM
Hi I'm using a progress bar component with a variable called mysound. It works when I use it but I have lots of sounds that use (mysound). It only works once on the first time using mysound. How can I set it back to zero so that when I load another sound it will work again.

I have the mode set to polled
And the source set to mysound

Probably easy but I checked the documentation and could not find an answer thanks

figured maybe some code would help.SO depending on what is chosen in the combo box mysound loads that sound.

switch(mycombo.value){



case one:

mysound.loadsound("one.mp3",true)

break;

case two:

mysound.loadsound("two.mp3,true)

break;

Etc. Like I said it works for once for a sound but when I load a different sound the progress bar just stays at 100%.
It is the Flash 8 progress bar.
Thanks

wintzell
10-25-2006, 10:22 AM
(If it is an option) you can give the different sounds different variables, like so:

switch(mycombo.value){

case one:
mysound.loadsound("one.mp3",true);
my_pb.source = mysound;
break;

case two:
mysound2.loadsound("two.mp3,true);
my_pb.source = mysound2;
break;

loach
10-25-2006, 08:16 PM
I was thinking something along those lines last night. But would'nt I have to create a new sound object as well for each variable. Like mysound1 = new sound(), mysound2 = new sound, mysound3 = new sound, etc ?