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




Volume Control Problem



ok, i have audio on my site and i want to add a volume control. i have a volume up and down btn.

on (press){
if (volPercent != 0){ //check for lower limit
vollevel._xscale -= 2; //volume bar decrement
volPercent -= 2; //volume decrement
setVolume(volPercent * 2);//update object
}
}


but when i put audio in the main time line it doesnt control the volume of it, and if i put audio in the MC that the controller is in, it doesnt play at all.
what am i doing wrong????????????????????????????????????????????? ?????????????????????????????????????????????

Cheers



FlashKit > Flash Help > Flash General Help
Posted on: 02-12-2004, 03:42 PM


View Complete Forum Thread with Replies

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

Flash 8 FLV Playback/Custom UI Volume Components With Global Volume Control
I'm creating a multi-scene swf with several FLV Playback - Player 8 Component videos on different scenes/frames.

I want to use the FLV Playback Custom UI Volume Bar so that when a user makes a volume adjustment during one FLV Playback viewing that volume adjustment will remain throughout the other FLV Playback video viewings.
This will prevent the viewer from having to make volume adjustments for each viewing. However, I want to enable the volume change to be made and changed at any time throughout any of the video viewings. Another aspect of this is that the FLV Playback Component has a volume setting that would have to be overridden by the global custom UI volume setting.

Is this possible? If so, how would this be done?

Thanks!

James
jamesk@pacificmm.com

[F8] FLV Playback/Custom UI Volume Components With Global Volume Control
I'm creating a multi-scene swf with several FLV Playback - Player 8 Component videos on different scenes/frames.

I want to use the FLV Playback Custom UI Volume Bar so that when a user makes a volume adjustment during one FLV Playback viewing that volume adjustment will remain throughout the other FLV Playback video viewings.
This will prevent the viewer from having to make volume adjustments for each viewing. However, I want to enable the volume change to be made and changed at any time throughout any of the video viewings. Another aspect of this is that the FLV Playback Component has a volume setting that would have to be overridden by the global custom UI volume setting.

Is this possible? If so, how would this be done?

Thanks!

James
jamesk@pacificmm.com

Volume Control
is there a way to control the volume from level 0 on a movie in level 1 without too much work involved?

i e. a small modification of

______.setVolume(50);

where ______ is the movie in level 1 that i want.

Any help would be much appreciated!

Volume Control
Hi, I'm a newbie and tryng to make my first volume control slider. This is the scipt associated to the button symbol:

on (press, dragOver) {

startDrag ("", false, -18, 0, 18, 0);

}

on (release, releaseOutside, dragOut) {
stopDrag ();
_root.music.setVolume(50+(_x*3));
}

It works fine but I wish it worked during the button dragging not when it is released.

Volume Control
Good evening,

I've been tried to build a control volume in flash but whitout success.
In the first frame of my main time line i add my sound

s = new Sound();
s.attachSound("som");
s.start();

Then i put my movie clip with the following actions:

onClipEvent (mouseDown) {
startDrag (retangulo, true, 50, 150, 100, 250);
dragging = true;
}
onClipEvent (mouseUp) {
stopDrag ();
dragging = false;
}
onClipEvent (enterFrame) {
if (arraste == true) {
_root.s.setVolume(250-_y);
}

Volume Control
Does anyone know how to make a vertical slider which control the volume of some music???

Volume Control
ok i want to create a volume control with a slider....hows this done?

The Volume/Pan Control
I just can't get this....

I'm going through Joe Jabon's tutorial to add a pan and volume control in my movie but I get to the step where I'm setting the actions on the sliders and I can't find the darn action for pan. I found set.pan and get.pan but they don't do what I need to do which is:

OnClipEvent (enterframe) {
pan = 2*_parent.panslider.drag._x;
_parent.mysound.setPan(pan);
_parent.panAt = Math.round(pan);
}

I got the onclip event no problem but can't find the other actions in the menus provided. Is there an option somewhere where it inserts a blank line and I can fill it out?

Kinda doing this as a last resort since I've looked everywhere to find out how to do this...

Charles.

Volume Control
Is it possible to control the sound of a movie instead of just a sound. I don't think that u can use setvolume to do that...or can u? Plz help!

Volume Control
Is there anyone who can explain me how to create a volume control.

Volume Control
I've created an on/off volume control, and it works perfectly... but what I want to do is when you click the off button, don't have it "Stop All Sounds". Instead, I want it to set the volume to 0, and obviously have the on button set volume to 100. How can I achieve this goal? Thanks

Volume Control
Does anyone have any resources on volume control with a slider? I want to create a horizontal drag bar thingy, and if you're half way, its 50 vokume.. all the way 100 obviously... any resources?

Volume Control
Is there a way that I can have a flash interface control the volume of the music on my site?? I want to have a volume slider and I want it so the user can use that to control the volume of the music on the site.

Volume Control
How do you control the volume of a background track. What is the action script i need. I've got a series of 5 buttons, and i'd like each one to equal a 20% jump in the volume on(release)

Thanks

Volume Control
Can somebody help me to get my volume controler to work. I have the slider built but the fllowing part of the script wont work..
------
_root.MyAudio.setVolume(level);
------

I know the problem but need a solution....I don't have the audio in a seperate movie nor is it being controlled from the library. The sounds clip is ON the timeline because I am streaming it in order to control text coming in at certain points.

So how can I control the sound volume if it is on the timeline is my main question??? Is there some type of SetAllVolume action or anything like that?

Thanks
http://www.e-simpson.net

Volume Control
Have got a flash music player which when a track is selected loads in a movie with the streamed track on the main timeline onto level2. I`ve got a slider control set up but am having difficulty in linking the slider to control the volume.

Any ideas?

thanks in advance

jonathan

Volume Control
Is there any way to control the volume of a track thats been loaded from an external .swf using the loadmovie function?

Volume & Pan Control
How dow I link sound to the Flash MX Volume Slider & Pan Control.
Thanks
Chanse Turner

Volume Control
I have this working code for a volume slider:-

vol = -100+Volume._x;
_root.Sound1.setVolume(vol);

When the slider is moved to the left the volume increases. When it is moved to the right, it decreases.

I am trying to swap this around so the left decreases the volume and the right increases it.

I have tried swapping the values in the code:-

vol = +100-Volume._x;

but it does not work. Any ideas?

Volume Control
Wow, I'm full of questions tonight. Anyway, about the volume setting. I don't want the volume to control a single object only... I want it to control the master volume. I just want two buttons to be able to set the volume either all the way up or all the way down. Fading would be nice, but isn't necessary. And no, I don't want to use the "stopallsounds" thing, since the sounds can still come back when you go into another section. I'm probably missing something very easy here, but I get stumped like this sometimes... Thanks in advance for any help!

Volume Control
Hi folks!
I am trying to control the volume of a sound clip through soundobject.
This is what I have done.
Imported a soundclip in a new Flash movie. Under the linkage I named this as "Lousound". On the first frame of this movie, I have attached the following code:

_global.sndtrack = new Sound(this);
sndtrack.attachSound("Lousound");
sndtrack.start(0,999);

I have exported this movie as mysound.swf. On my main movie I have an empty mc. On the first frame of this empty movieclip, I have attached the following code.

loadMovieNum("mysound.swf",20);
_level20.sndtrack.setVolume(20);

Though the sound plays fine, the volume remains at 100 and not reduced to 20. What am I doing wrong?
Thanks a lot!!

Volume Control
Hi folks!
I am trying to control the volume of a sound clip through soundobject.
This is what I have done.
Imported a soundclip in a new Flash movie. Under the linkage I named this as
"Lousound". On the first frame of this movie, I have attached the following
code:

_global.sndtrack = new Sound(this);
sndtrack.attachSound("Lousound");
sndtrack.start(0,999);

I have exported this movie as mysound.swf. On my main movie I have an empty
mc. On the first frame of this empty movieclip, I have attached the
following code.

loadMovieNum("soundflash.swf",20);

Once loaded into my main movie I have following code, which set this sound object initially to 5% and then to 100%.
this.onEnterFrame = function(){
if(_level20){sndtrack.setVolume(5); }
trace(5);
};

On the next frame I have 100% of this sound

this.onEnterFrame = function(){
if(_level20){sndtrack.setVolume(100); }
trace(100);
};

Now I have a volume controller. I want the volume controller to control this sound object. On the slider I put following code and it did not work.

onClipEvent(load) {
_root.volslider.drag._y +=50;
}
onClipEvent (enterFrame) {
vol = _root.volslider.drag._y+50;
_level20.sndtrack.setVolume(vol);
}

But still the volume is not changing. Could anyone please tell me what I am doing wrong?

Thank you for time.

How Can I Control The Volume?
I'm making a piano in flash where I illustrates the soundwave to 8 different tones. When I play those different tones I get different soundcurves up. And the curves also change when I press on "volume" buttons. But I also need to change the volume. How can I do that?
I've 5 buttons, "100%", "75%", "50%", "25%" and "Off".
Can somebody please help me?

Overall Volume Control...
I have a sliding volume control on my main movie. How can I make it control the volume of all the .swfs being loaded into the main movie???

-Dyce

Volume Control
Is it possible to control the volume on an imported SWF with audio similarly to the way you would control the volume on a linked audio clip?

Volume Control
I need to import SWFs with audio into an MC of another movie. Each of these SWFs has it's own audio source and volume control, but when they are imported into the MC of the main movie, the audio plays, but the volume control stops working.

Can anybody please direct me to a volume control script that is made to be imported this way?

Can Someone Help Me With Volume Control?
How do I fadeout a loop?

I'm using this for the sound control:

_root.bgm = new Sound(music);
_root.bgm.attachsound("loop2");
_level0.bgm.stop("loop2");
_level0.bgm.start(0, 999);

is there a way to fade it out with a button click?

Volume Control
http://www.flashkit.com/movies/Sound...8331/index.php

I need to know how to make the volume control on the file above max out at the max volume. Please let me know how to do it if it is possible. Thanks.

Volume Control
can some one show me how so make a volume button that increase's the volume and a button that decreases the volume. I can do the buttons but i dont know the code

Volume Control
Howdy I'm hoping somebody can either provide a link or explination of a volume control feature. All I have is a plus "+" button and a minus "-" button which will raise or lower the volume. Furthermore I have a graphical indicator that "goes up" or "down" depending on the volume. I think I can figure this last part out once I have an understanding of how actionscript controls volume.

I'm running Flash 5. Any help is good help.

Help - Volume Control
For a music player how do you do volume control? like a lil slider that controls the volume

Volume Control
I have created a simple music player and now I need to be able to let viewers control the volume. I have created a series of stacked bars (buttons). I would like people to be able to click on the bar that represents the volume level they want. Also, if a person clicks the bars half way up how do I keep them lit, like on their over state, to show how high or low the volume is. Thanks
www.thediveband.com/mediaplayer.htm

Volume Control
Hi,
I'm using this script to control the volume of an audio file that is located in the library of this MC.
How can I modify this script so it would control an audio file which is not in th elibrary, but being externally loaded (streamed)?

Thanks for your help.

Joe

myMusic = new Sound(this);
myMusic.attachSound("mySound");
myMusic.start(0, 99);
slider.control._y = -50;
slider.control.onEnterFrame = function() {
myMusic.setVolume(0-this._y);
}
slider.control.onPress = function() {
startDrag(this, false, this._x, -100, this._x, 0);
}
slider.control.onRelease = function() {
stopDrag();
}

Volume Control
Hi all, I have an array of mp3s that I have playing at random. My problem is how I incorporate my volume control slider my my other code. My array is as follows:
//in my song.as file which is included on first frame of flash movie
songs = new Array();
songs[0] = a.mp3
song2[1] = b.mp3
songs[2] = c.mp3

// random function
var currentSong;
function changeSongs() {
Math.floor(Math.random() * (songs.length - 0)) + 0;
randomNum = Math.floor(Math.random() * (songs.length - 0)) + 0;
currentSong = "http://..."+songs[randomNum];
}

This all works fine, so i grabbed a volume slider script off the web which uses this functionality on the volume slider bar movie clip instance:
onClipEvent (load) {
mySound = new Sound();
mySound.loadSound("a.mp3", false);
}
onClipEvent (enterFrame) {
downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = "downloading song...";
} else {
complete = 1;
_root.dl = "";
}
mySound.setVolume(_root.volume*2);
}

My problem is getting my array values into this function since using the global variable 'currentSong' (declared in my songs.as file) won't load in this onClipEvent method:
//ie. this won't work
onClipEvent (load) {
mySound = new Sound();
mySound.loadSound(currentSong, false);
}

I don't understand why my variable can't be seen in the onClipEvent method...? I can't even call my changeSongs() function inside the onClipEvent. Any ideas?

Any help is appreciated.
- Shu

Volume Control
I have a video clip and a separate sound clip. When the video clip (which is in a separate movi clip)reaches frame 1200 I want the music to fade out. Or when the music reaches 1:40 I want it to fade out. I've tried code for both ways and can't seem to get it right. Any suggestions?

Volume Control
I am looking for any kind of tutorial to help me figure out how to create a sliding volume control i have for an embedded video (my client can't stream). if anyone could recommend something to me I would greatly appreciate it...

Help With Volume Control
I am new to Flash...
but was handed a banner that I didnīt create...

I canīt really see on the timeline how or where the sounds are...

all I need to do is make the entire volume of the banner lower...

can someone help me?

Volume Control
i need a volume control slider that will control the volume of whatever is playing in my flash movie. any help?

Volume Control
I've been looking for a volume control but Havn't had any luck, any ideas?

More Than One Volume Control?
using action script2 flash cs3, and i need more than one volume slider/control and each control needs to be assigned to one sound, atm i have more than one volume slider but they all control the same sound, please help!!

Volume Control Help
Hi, i was doing this tutorial on volume control and i understand most of it:

http://www.kirupa.com/developer/mx/volume_slider.htm

the problem is, i want it to begin playing with atleast 25% of the volume already up & with the slider in the correct position, not at 0

does anyone know a solution?

Volume Control
I have imported a mp3. cound in the timeline.
How can v control the volume of that sound clip wid the help of Action Script?

Control SWF Volume
Is it possible to control the volume of an external SWF file like the way you can control new Sound()?

The reason I'm asking is because I'm building an audio player and I can't use MP3s. I know it's super easy to control the volume with MP3s loaded through new Sound(), but I've never tried with an external SWF.

Any ideas or help would appreciated. Thanks!

Volume Control
Hello Guys

I have designed a movie player, now I want to have a volume control slide bar on it. since I have not worked with sound objects, i dont know how to do it, can someone please tell me where to find a good tutorial for sound objects

I want to control the volume of the videos played in a mc ( there are five different movies )

Can some one please help me on this

Thank You
Shriram

Volume Control
Hello Flashers!

I have a volume control I am trying to get working correctly. Here is a bit on what I have so far. I have a movieClip name "nub" ..when you press on this it starts a function that contains an onEnterFrame and a start Drag, when you realease it calls another function that kills that drag and deletes the onEnterFrame.. Pretty basic..

When you press the "nub" and begin to slide it back and fourth the volume reacts to its x positions. The beginning X is 0 and the ending X is 54.. So Technically when I have the "nub" maxed out the volume is really on set at 54 instead of 100..

Does anyone out there have any suggestions on how I can set so that 54 is the 100% mark?

Thanks!!!!

Volume Control
Main Code:

The line That I marked, doesn't work (Second to last)

Code:
gotoAndStop(1);
var url:String = "http://tzfiles.com/users/ryan/wolfmother - woman.mp3";
var mp3:Sound = new Sound();
mp3.onID3 = function() {
var songInfo:Object = this.id3;
songArtist = songInfo.artist;
sontTitle = songInfo.songName;
}
volumeControl.mp3.setVolume(_root.volume); //This line doesn't work
mp3.loadSound(url, true);
SlideBar Code:

Code:
this.ratio = 0;
dragger.onPress = function() {
this.startDrag(true, 0, 0, line._width, 0);
this.onEnterFrame = function() {
ratio = Math.round(this._x*100/line._width);
_root.volume = ratio;
};
};
dragger.onRelease = dragger.onReleaseOutside=stopDrag;
What is happening, is that the volume doesn't go up or down when the slider moves.

the player I made (The one that doesn't work) - http://tzfiles.com/flash/audio_player.swf

I copied the tutorial from here: http://www.kirupa.com/developer/mx/volume_slider.htm

SFX Volume Control
Hi,

i have a mp3 sfx on a layer of my swf and it plays pefectly when your in the video. all i want is a little control i can use to turn up down and mute the sound. any ideas anyone??

cheers

Control FLV Volume?
Is there an AS way to control the volume of an FLV placed inside a SWF?

Volume Control
is there a simple and quick way to add in a volume control?

or edit the volume of my music in flash? becas the soundtracks i hav vary in volume and i hav embedded them into the flash movie...

Volume Control
hi friends
I have to develop a video player which has a youtube like audio control..
I have done one but it only pop up but i can't use roll oOut..
and i use a invisible button and if i use it wen i roll over the other button inside it doesn't response...
please help me a am attaching the file

http://www.mediafire.com/?sharekey=e...db6fb9a8902bda

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