-
if(i>$){i=:);}
Help!! How Do I Do This?
The stopallSounds action script mutes all sounds and I only want to stop one. Basically I want to control the stopping of a sound effect without stopping the background music loop. Can anyone help?
-
Senior Member
Dilema = new Sound(this);
Dilema.attachSound("Dilema");
Dilema.start(0, 9999);
Dilema.setVolume(2);
volume is 1 to 100
the 0, 9999 makes it loop
then to stop it use
Dilema.stop();
that help?
-
if(i>$){i=:);}
is Dilema the name of an audio clip?
I tried it and it didn't work? What am I doig wrong? I put it in a frame action and the sound doesen't start? Am I suppose to select the audio track in the properties pallett anlong with the attachSound?
Thanks
Last edited by falshdancer; 04-06-2004 at 08:10 PM.
la la la la laaaaaaa
-
Senior Member
what you have to do, go to your library and right click on the song
then select linkage
and click export to actionscript, then name it watever (Dilema)
then you dont add it into the frame, it loads it from the library
-
Senior Member
oops, double post =/
do u understand?
-
if(i>$){i=:);}
Sweet, Now it works. Thanks soooo much man!
-
Senior Member
-
What if, in my case, I want to maintain the background music to a volume of 20 and when I click a button, the volume of a sound effect is 100? What ends up happening is that my background music increases its volume to 100 along with the sound effect.
(Starts on the root movie clip)
music = new Sound(music); //bkgd. music.
music.attachSound("music");
music.start(0, 9999);
music.setVolume(20);
(Now, the actionscript in a button)
on (release) { //sound effect.
mySound = new Sound(mySound);
mySound.attachSound("mySound");
mySound.start();
mySound.setVolume(100);
}
You think after specifying the target, the code would make sense.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|