PDA

View Full Version : .attachSound loop!?!?!


NazWeb
03-19-2001, 02:20 PM
I need help with the .attachSound or some better idea of what im trying to do. I want a backbeat on a website with volume control.

The Macromedia help shows how to use .aatachsound to make volume controls with. HERES the prob---the AttachSound command only plays the Loop one time!!!! I cant figure out how to make it keep going--or can I make a movie with volume controls--Ive METROVs site--he did it somehow...can anyone help?

Marx
03-19-2001, 03:23 PM
Hi...
The following script sets up a sound object:

s = new Sound();
s.attachSound("mySound");
s.start(1,100);

The final line of the code starts the music after '1 second' and loops it '100 times'. Replace the figure 100 with whatever number you want to represent your loops.

To set the volume you would:

on (release) {
s.setVolume(25);
}

This will decrease the volume by 75%.

Hope this helps.

NazWeb
03-19-2001, 03:42 PM
Im gonna have a slide for the volume but that start (1,100) was pure gold to me!!!

thanks MArx!!!