Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Help Sound Volume And Pause



does somebody know how to set de volume to a sound and also to put pause to a sound?

i will thank you a lot



FlashKit > Flash Help > Flash General Help
Posted on: 09-15-2003, 11:43 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Help Sound Volume And Pause
help! sound volume and pause
does somebody know how to set de volume to a sound and also to put pause to a sound?

i will thank you a lot

PLS HELP: Controlling Global Volume And Pause Functionality
I have 10 individually loaded SWF files that all have audio within them. Is it possible to globally pause what's being played with the click of a button? Also, I would like to have a mute button the would mute or un-mute any audio that is being played... any ideas on how this can be done?

Thanks a lot for any help or insight you may be able to provide!

Thanks,
Zach

Is It Possible To Change The Sound Volume On Individual Attached Sound Clips?
For instance, I have 2 attached sound samples, both playing continuously. I want to be able to control the volume for both separately.

All I know I can use is setVolume, but that one seems to be global only and changes the volume on both.

I tried having different names on the attached sounds (sound1, sound2) and had the volume buttons refer to sound1.setVolume and sound2.setVolume, but each of them controlled both sounds. Also tried attaching the sounds into individual MCs, but got the same result .

So, can this be done?

Edit: oh, there was a forum for sound and music, my bad. Can seem to find how to delete this thread so have to leave it here or if some mod moves it.

Edit2: Ok, think I got it to work, was trying this method before posting (from FAQ), but couldn't get it to work... might have now... buggy it seems.

Quote:




Why is my sound object controlling volume or pan of all sounds in the movie?
a sound object without an associated mc is a "global" sound object and controls volume and pan of all loaded sounds.

to ensure that a sound object controls just one sound pass the target path of a unique movie clip to the sound function.

myuniquesound = new Sound(target path to unique mc);

OR

// dynamically create a mc and associate it with a sound object
soundobject = new Sound(createEmptyMovieClip("snd",getNextHighestDep th()));




Edit3: Problem solved .

How To Control The Sound Volume On A Timeline Base Streaming Sound?
Hello everyone,

I have a MovieClip "Animation" with added sound as a Streaming. I have also created a Volume SiderBar which I would like to use to adjust the volume of the sound on my Flash.

The Volume SliderBar work fine and I need to some how assign the volume to the position (Value of) volume. I was wondering if someone can tell me how I can do this on a sound which is timeline based?

Thank you very much and have a great day,

Khoramdin

Sound Control Volume For Multiple Sound Objects?
I've got a file with several scenes.

Each scene has controls with different sound object defined on the first scene. There is a constant background sound object playing over all scenes. I need to control the volume of multiple sound objects playing simultaneously and setting each to different volumes from these scenes.

e.g
_root.bgmusic.setVolume(20);
_root.s001.setVolume(100);


can this be done? When I try, all sounds playing are set to the same volume.

Thanks heaps in Advance!

Sound Control Volume For Multiple Sound Objects?
I've got a file with several scenes.

Each scene has controls with different sound object defined on the first scene. There is a constant background sound object playing over all scenes. I need to control the volume of multiple sound objects playing simultaneously and setting each to different volumes from these scenes.

e.g
_root.bgmusic.setVolume(20);
_root.s001.setVolume(100);


can this be done? When I try, all sounds playing are set to the same volume.

Thanks heaps in Advance!

Sound Volume Control Using Streaming Sound In Timeline?
I am building a Flash 8 movie with animation that is synced to music in the timeline using streaming sound. At a few points I need the music to fade out and then play a video. When the video is done playing I need to come back into the timeline and have the music fade back up at the same point where it left off.

Is there a way to do this? turn down/up the volume of a streaming sound?

Mute Sound/Pause Sound Button HELP
I made a button (Flash CS3, AS2 file) and want it to mute a sound called 'GuitarLoop' which I've imported and have on 'Layer 3. My button's on 'Layer 3' and I need it to mute 'GuitarLoop' when pressed.

I searched on google but didn't really find anything, soooo.... Do you know how I could fill in the blanks?

on (release) {
not_set_yet.stop()
}

I'm guessing here but...

on (release) {
GuitarLoop.stop();
}

or


on (release) {
'GuitarLoop'.stop("Scene 3", "Layer 3", 1)
}

is it something like that?


also this is a looped sound.

Sound Volume?
Hey everyone. I have created a flash file. 1 have 1 button and on another layer on the same timeline the actual sound file..i ahve named the file "mp3" in the linkage properties..

what i want to do is each time i press the button it increases the volume by 1.

this is what i have got so far.

frame 1 of main scene:


Code:
var volume;
volume = 50;
then on the button i have


Code:
on (press) {
volume++
mp3.setVolume(volume);
mp3.getVolume();
}
Can anyone help me out please?

Thanks in advance

Blue Dragon

Sound Volume
Hmm, as I was inserting a sound clip into my movie, I realized there is no way to change the volume of the sound. Could this be true? I know how to change the envelope setting but there has to be some way to simply increase or decrease volume. Or?

I Use flash MX

Sound Volume
in Flash MX - how can i use action script to change an event sound's properties? eg. can have the sound begin to fade out at a particular frame?

depending on the speed of the computer it might be at a different place in the MP3 so i can't simple edit the sound file before import or use sound effect properties

**CHEERS**
Mousey

Sound Volume
I have attached sound to my movie, however I would like to set a default volume level so when the movie begins, the volume plays at this level.

Also I understand the the range is from -200 to +200. Is this true?

Here is the script I am using: -

Sound1 = new Sound();
Sound1.attachSound("BGSound1");
Sound1.start(0, 999);




Thanks

Sound Volume
Im having a slight problem with sound volume over 2 different sounds, heres my code:

vol = 50;
mySound = new Sound();
mySound.attachSound("main");
mySound.start("", 999);
mySound.setVolume(vol);

turnon = new Sound();
turnon.attachSound("turnon");

Now whenever i use:

turnon.start();

I can't hear my sound because the other one is too loud, and wheneven I lower vol or use turnon.setVolume(100) it sets that volume level to all the sounds. How can I avoid this?

Thank you.

Sound Volume
when I put a sound in the frames and play the frames, the sound comes out with the perfect volume, but when I publish the whole movie the sound/sounds volume are cut in half almost,

but when I publish one of the scenes that have the sounds it comes out perfect as playing it on the frames.

why does if do that, and how can i fix that?

PS: also I have one sound/music file that i use as a sound object and it comes out perfect no matter how i publish it. Do I have to make all my sounds as objects?

Sound Volume
I have a movie with various roll over sounds in various movie clip.
in one movie clip I have a background looped sound.

_root.bg = new Sound();
_root.bg.attachSound("bgsnd");
_root.bg.start(0, 10000);
_root.bg.setVolume(0);
voly = 0;
while(voly<=50){
trace(voly);
voly++
_root.bg.setVolume(voly);
}

on a I have looping volume script that is worked by a plus and a minus button..

if(playnum == 1){
if (voly >= 1) {
voly--
_root.bg.setVolume(voly);
}
}
if(playnum == 2){
if (voly <= 99) {
voly++
_root.bg.setVolume(voly);
}
}

the problem is that not only does it control the volume of the bg sound but it seems to be controlling some of my other sound too! can I prevent it doing this?

Is the only way to stop it doing this loading a separate movie for this sound?

cheers

Craig

Sound Volume
Good day,
I have a movie that has 2 sound effects. One for a button over and on for a button down. The problem is I can't give each sound a separate volume setting. I am controlling each sound as follows:

this.slide = new Sound (this);
this.slide.attachSound ("slide2.wav");
this.slide.setVolume (50);

this.rollover = new Sound (this);
this.rollover.attachSound ("rollover.wav");
this.rollover.setVolume (20);

The volume is set by the first setVolume command and the second is being ignored.
I also have a main movie volume that is over-riding all the sounds. Which is annoying.

So in brief I need to be able to control each sound separately. Any help would be greatly appreciated.

Cheers
*id_42

Sound Volume
Its been a while since i've been here.... I'll get straight to the point = ]

setVolume command controls all the volume for every sound, this I know. what i forgot is the way to get around it, so the set volume command only affects one sound.

i remember there was a way. thanks a lot guys.

(using flash MX v6)

Sound Volume
I have ready many threads on volume and I can't get it to work. Can someone tell me step by step directions.. This is what I have

MovieA.swf on frame 1 I put a sound wav file out there.

Movie B.swf on a layer, frame 1 I have the sound file playing with the loadmovie command

Now I need to lower the volume for this file only (not globally)

I see I need to make this an object sound file. So, in movieA.swf
exactly what do I do, then in MovieB exactly what do I do.

It is so confusing. I placed a command in movie A on the frame 1 that says..

firstSound = new Sound();
firstSound.attachSound("firstSound01");

Then I did the linkage to firstSound01 and clicked the actionscript option.

Then I went into Movie B and I made an ecmpty movieclip named mcinstance. Then it says to name the instance mysound. To do this, you have to drag the MC out to a frame on the main stage... right? I did this and then named the instance mySound. Then on the main stage I wrote
on frame 1 layer 3, (by the way on this main stage I have a MC dragged out here. The entire movie is in the MC (a different one thant he music)

mcinstance.loadMovie("approachaud.swf");
mysound.setVolume(50);

what am I doing wrong?

Sound Volume?
Is it possible to adjust the volume of different sound files? I've made a movie but some of the sounds i want to be louder then others. Can anyone help me with this?

Sound Volume
I am trying to adjust the volume for individual sound objects using


Code:
my_sound = new Sound()
my_sound.attachSound('whatever')
my_sound.setVolume(50)
It works fine, except it changes the volume for every sound, I want different sound objects to have different volumes.
Any help is appreciated. Thanks.

How Do I Set Volume Of A Sound To Zero (vol.)?
i know there is a bit of actionscript, maybe a var. that would control the volume of a sound using actionscript. can someone pls share this knowledge? many thanks and a bottle of beer to the winner!

Sound Volume Up-down (mx)
First in my movie I attached this background-music:
s1 = new Sound();
s1.attachSound("bgSound");
s1.setVolume(100);
s1.start( 0,1);

Later I want it to fade, and i write:
s1.setVolume(30);

The problem is it fades all other sounds. How can I keep all the other sounds at volume 100 and only fade my bgSound?

Thank you in advance
/Julez

Sound Volume
Hi

Is it possible to alter the volume of a single sound object? i.e:

var sound1:Sound=new Sound();
var sound2:Sound=new Sound();

sound1.attachSound("sound1");
sound2.attachSound("sound2");

sound1.start(0,99);
sound2.start(0,99);

If I use:

sound1.setVolume(25);

Both sound objects set their volume to 25, is it possible to set the volume for a single instance?

Thanks, JT

Sound Volume
I have a file that has a background sound that starts via this script
code:
my_sound = new Sound(this);
my_sound.attachSound("background.mp3");
my_sound.start(0,999);


within the movie clip that holds the on/off there are three frames with these scripts:

Frame 1
code:
soun = new Sound();
i = 100;
soun.setVolume(i);
gotoAndStop(2);

Frame 2
code:
stop ();
this.onEnterFrame = function ()
{
if (i < 100)
{
i = i + 2;
soun.setVolume(i);
} // end if
};

Frame 3
code:
stop ();
this.onEnterFrame = function ()
{
if (i > 0)
{
i = i - 2;
soun.setVolume(i);
} // end if
};

Problem is that I have a button click sound on all of my buttons. I put them into the timeline on each button. The volume goes off on those buttons when I turn the background music off. And then back on when I click the music on button.

Sound Volume
Hi currently porting from lingo to flash and need a simple solution to this problem. I have 2 movieclps on stage and wish one to function as an "up" volume control and the other to work as a "down" control. Incrementally. I've written this code. I can get the "up" control to work fine, but he "down" volume won't work. Any ideas or tutorials gratefully received.

quote:
//variable set to 0
up_vol = 0;


sound_up_mc.onPress = function() {

//on mouse press increment the value of vol by 10
up_vol = up_vol + 10

//set the volume value of the sound to the value contained in vol.
my_sound.setVolume(up_vol);


}

//set a variable for down volume.

down_vol = 0

sound_down_mc.onPress = function() {

//plug the down_vol value into the setvolume parameter

down_vol = down_vol - 10
my_sound.setVolume(down_vol);

}



many thanks

julie
*

Volume Of Sound
How can you set the volume of the sound? I have a background tune, but by that you can't hear anymore the sound effects for the buttons.

What to do?




Thanks in advance
Nico

Volume & Sound
I went to Kenny Bellow's sound tuts... I understand how to make the play, pause, and stop. But, I want the music to automatically...

Anyone know how to make the sound start automatically, allowing people to pause / stop it on their will?

Thanks

Sound Volume Very Low
hi guys
i've sound object in the root and it woks but it's very low ...... if you test it in mediaplayer it's hight and very good i don't know why
i tried to use setVolume(100) and it didn't make any change.

can anyone help me

Volume Sound
If I put a sound file on my time line, How can I control the volume? Do I create a button and add a code?

Sound Volume
Hello, i got this code that should load a sound and slowly raise the volume for that sound. However, instead of just affecting one sound, it affects all the sounds in my movie, causing all of them to be low at first.

var bgSound, bgSoundvol;
bgSound = new sound();
bgSound.attachSound("bgsound1");
bgSound.start(0, 1000);
bgSound.setVolume(0);
this.onEnterFrame = function() {
if (bgSoundvol>=100) {
this.onEnterFrame = null;
}
bgSoundvol = bgsoundvol+5;
bgSound.setVolume(bgSoundvol);
};


Can anyone see why this side effect occurs?

Any help is appreciated... thank you.

Volume & Sound
I went to Kenny Bellow's sound tuts... I understand how to make the play, pause, and stop. But, I want the music to automatically...

Anyone know how to make the sound start automatically, allowing people to pause / stop it on their will?

Thanks

Sound Volume Very Low
hi guys
i've sound object in the root and it woks but it's very low ...... if you test it in mediaplayer it's hight and very good i don't know why
i tried to use setVolume(100) and it didn't make any change.

can anyone help me

Set Sound Volume
i wanna know....how to use actionscript to set a sound volume?!

cos i wanna set my sound fade out when a frame is loaded

how can i do this?

Sound Volume
I am having a little trouble with managing the sound volume in FLash 5.
I did up a little test FLA and the problem I found may be at the root of the main problem I am having (if you get me? )

Anyway, in the test app I just added a button and some actionscript to control the sound:

in main timeline:
-------------------

testsound = new Sound();
testsound.attachSound("buzz");
testsound.setVolume(100);


in button actions:
-------------------

on(press)
{
_root.testsound.start();
}


THE PROBLEM
----------------

Sometimes, when I click on the button the volume is very low. Actually nearly always, EXCEPT when I click the button repeatedly quite fast the volume is approx. 50% louder!


Has anyone ever had the same problem.

Thanks,

Mausy.

Sound Volume?
I'm using an external sound clip and I want to lower the volume to around 65% or so. I have it as
loadMovieNum ("sound.swf",1);

I can't open the .swf itself to lower the volume property there, its setup so it would loop perfectly.

Another question, how would I include this external swf file to be preloaded with the other content before the movie begins. The following preloader code:

total = int(_root.getBytesTotal()/1000);
download = int(_root.getBytesLoaded() /1000);
if (total==download) {
tellTarget ("../") {
play 0;
}
} else {
play 0;
}

Mute Volume Button & Start/Pause Button
Hi!

OK..I used to be "OK" at AS1 and AS2...but I haven't done Flash in 2 years. Now I've plunged myself into CS3 and AS3 and feel like I know NOTHING! And I suppose I do...I don't understand "Classes" and a lot of things.

Can someone direct me to a tutorial that teaches me how to:

1) Create a button that toggle mutes/unmutes an embedded audio (voice over) file that streams throughout the entire movie? (I need to be sure that the file syncs exactly to the animation, that's why it's embedded).

2) Create a button that simply toggles start/pause for the main movie timeline.

Thank you for ANY help you can give.

--Darcie

Controlling Pan & Volume Of More Than 1 Sound
Is it possible?......

What i want to do is with 'sound1' turn the volume down to 50 and pan to the right - while 'sound2' isn't affected

I can see how to do it for one sound but it seems to affect any sound i throw in to the movie.

Anyone seen anything about this?

thanks for your help

Sound Volume Control?
Hello everyone.

I am creating a presentation and this is what I am trying to do. I am inserting a sound file which continuosly loops thru many scenes.

Next, each scene has many links and each link opens up a new topic and I will have to insert a voice over for that topic.

Now what I want is, when I click on any link, the volume of the background music has to decrease, say to 60, and the main topic voice over should be in full volume at 100. I tried doing this using the sound object but when I try to decrease the volume of background music to 60, even the volume of voice over for individual topics decrease to 60. If anyone could help me on this, I will be highly obliged. Any clue, any code, any suggestion will be highly appreciated.

Thank u all my friends in advance.

Streaming Sound Volume (MX)
How to change the streaming sound volume ? I didnt use a sound object, just input it as streaming.

Sound Volume Is Working, But Why?
I have 2 buttons in an MC. When clicked on, they play sound.

The buttons have this code:-

Sound1 = new Sound(_root.Soun);
Sound1.attachSound("BGSound1");
Sound1.start(0, 999);

and

Sound2 = new Sound(_root.Soun);
Sound2.attachSound("BGSound2");
Sound2.start(0, 999);

These work fine. I also have a volume control with this code:

vol = -100+drag._y;
_root.Sound1.setVolume(vol);

This volume control works for both sounds. I don't understand why, because there is no reference to Sound2 , only Sound1.

Can anybody advise?

Sound Volume Troubles
Hi
I am trying to build a presentation ( projection ) and the final job will count one main SWF and 5 others external SWF.
I am attaching the soundtrack to every single swf by actionscript
( so iz not visible in the timeline)

s = new Sound();
s.attachSound("1song.mp3");
s.start();


i am also dealing with long and heavy mp3 files ( the soundtrack)
every swf Must finish with a fade out and as soon as the next swf is displayed must starts with a new song. No problem with the fade in because all the songs starts low and after few frames get a bit lauder by itself.

To fade out the soundtracks i am setting the volume

vol = s.getvolume();
s.setVolume(vol - 10);

vol = s.getvolume();
s.setVolume(vol - 20);

vol = s.getvolume();
s.setVolume(vol - 30);

vol = s.getvolume();
s.setVolume(vol - 40);

vol = s.getvolume();
s.setVolume(vol - 50);

but it doesn't really work because i don't know ( !??) how to fade out completely the sound ( very stupid question I know ) i can stil hear the GAP between the songS.
MY questions

1= what script must have a stop button in the stage to pause the animation and the sound too ? and the play button to make the animation and the sound start from were they where?

2= what value must have the last frame of script to totally SHUT down the sound ? (vol -100) ??

3= what is the best publishing setting for mp3 considering that when the songs are imported in Flash MX are all very heavy ( 5mb or >) ??

I even try to cut the songs with peak to make them smaller.

Please, i know all this can sound very confusing but that's my brain now.

thanks thank thank thanks

also posted on kirupa

Finding Sound Volume
Okay guys,

I'm thinking of making some sortof talking head for my navigation for my web site. I'm pretty sure i can just manually lip-sync the mouth to the voice in the background, but i'm wondering if there's an automatic way to do it.
Here's what i'm thinking. You can get flash to find the volume of the voice playing, and jump to a specific frame in a movie clip with the guy's mouth open as much as it needs to be. I sorta found something similar to what i need, but this requires you to type in aell the sound volumes in an array. I wanna know if there's some way to get a spectrum analyzer completely inside flash.

Sound Volume Problem
In my main flash movie I have 20 links to 20 songs each in there own individual .swf file. When a link is selected the song will stream. I want to add volume to the main movie that will work with all 20 songs. I have a movie with a volume control but it doesnt seem to work with the songs. Basically the script probably needs to be edited but I'm not really sure what to do.



Here is the script used in the volume movie

var volPercent = 50;
volumeText = volPercent + "%";
volumeFill._yscale = 50;

mySound = new Sound( )
mySound .attachSound( "soundfile");
mySound .setvolume(volPercent * 2);


(I have added the above script to my main movie):




here is the (-) volume button script:

on (release)(
if (volPercent ! = 0 )(
volumeFill.-yscale -= 2;
volPercent -= 2;
volumeText = volPercent + "%"
my Sound.setVolume(volPercent * 2);

)

)

here is the (+) volume button script:

volume button ( + )

on (release)(
if (volPercent ! = 0 )(
volumeFill.-yscale -= 2;
volPercent += 2;
volumeText = volPercent + "%"
my Sound.setVolume(volPercent * 2);

)

)



So there is all the script. please can someone help

thankyou

Volume To A Spesific Sound.
i want to set a volume to a sound i have but i can't because when i set in actionscript (sound.setVolume(20)) all sounds that are playing, get loud but i want to a specific sound.

can anybody help me???

thank you!!!

Sound Volume And Next/Pre Buttons
Hi I have this code to control the sound volume.

volume = new Sound();
volume.attachSound("test");
volume.start(0,999999);
stop();

I want to add 5 more sound to this. I will allow the user to choice the sound they want to play and i will have next/pre buttons to control the selection. How would i connect them all together. Whenever the user choices the the sound it will be controlled by the volume control buttons. How would i do this.

Sound Volume Fade
Is there a way to fade a background sound both up and down with buttons exporting to Flash Player 7 and using ActionScript 2.0?

Sound Volume Question
i have a movie clip that is a video woth audio...is there a way to increase th evolume of the audio on that video in action script without haveing to do it in premiere...

Streamed Sound Volume
I have movieclips with a voice over, which is streaming, and I want to have a button that toggles the volume on or off. I know using the sound object Sound.setVolume() can set volume levels, although how can I use this to target a sound which is in the timeline, and not started by script?

Thanks

Video Sound Volume
Hi everyone,
I would just like to increase the volume, not control volume, but the video that I am streaming does not have very loud sound volume
here is my code: (i have been told that you can increase volume as loud as you want, even until it distorts)

onClipEvent (load) {
i = -200;
my_sound = newSound();
my_sound.setVolume(200);
}

will that do it? I dont seem to notice any change, but its going at 200?
dunno

Copyright © 2005-08 www.BigResource.com, All rights reserved