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








Controlling Volume Embedded Mc


Hi,

I have movie in which several clips play and I need the ability to pause and play these clips, and mute and un-mute the volume.

I have the play and pause working from the root, but nothing I can figure out will turn off the volume of the embedded clip that's playing.

I've tried declaring a new sound in both the root and in the embedded clips and using the set volume command within the mute button.

_root.mySound.setVolume(0);

I have also tried attaching sounds to the sound object but this seems to make playing and pausing the clip a problem as stop and start, cause the clip to start playing from the begging.

I will be grateful for any insight.

Chris




Adobe > ActionScript 1 and 2
Posted on: 04/28/2007 06:22:18 PM


View Complete Forum Thread with Replies

Sponsored Links:

Controlling Volume For Embedded Audio
I have a problem that someone may be able to help me with. I do a lot of audio/photo slide shows in flash. To get the audio and photos to synch up during the course of the slide show I have to put the audio directly on the timeline and put in the photos in the appropriate places to match the changes in the audio. I found a good tutorial a while back on how to build a volume slider in AS2 so I could control the volume of the sound on the main timeline but I can't get it to convert over to AS3.

My old volume controller basically looked like this:

within a MC instance name "knob" there is an action to make the knob slide:


ActionScript Code:
on (press){
startDrag("",false,0,0,50,0);
}

on (release, releaseOutside){
stopDrag();

}

on the timeline of the movieclip where "knob" and "track" reside there are 3 timeline actions

first frame:


ActionScript Code:
smooth_audio = new Sound();
knob._x = 25;

second frame:


ActionScript Code:
vol = knob._x*2;
smooth_audio.setVolume(vol);

third frame:


ActionScript Code:
gotoAndPlay(2);

This was a great tutorial and I'm sorry I lost track on who wrote it or I would site them here.

so I basically want to do the same thing using actionscript 3...

I have built a slider that I'm trying to use but I'm just not getting it to work right.

I have a slider that I built that I have used for other things and it would be awesome if I could build a similar functionality into it (I have a movieclips named "knob" and "track" wrapped inside another movieclip):


ActionScript Code:
stop();

var vertical:Number;

knob.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler);

knob.buttonMode = true;

function mouseDownHandler(evt:MouseEvent):void {
  vertical = track.y + (track.height / 2 - 6);
  knob.startDrag(true, new Rectangle(track.x, vertical, track.width, 0));
  stage.addEventListener(MouseEvent.MOUSE_UP,mouseUpHandler);
}

function mouseUpHandler(evt:MouseEvent):void {
  knob.stopDrag();
  stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
}

function mouseMoveHandler(evt:MouseEvent):void {
  ??????????????????;
}

I know the functionality should be built into the mouseMoveHandler but I'm not sure what that needs to be...do I need to make a soundChannel variable? other variables...as you can see I'm to up to speed on working with audio. If anyone can share any ideas for suggest a tutorial or something let me know...thanks!

View Replies !    View Related
Controlling The Volume / Soundtransform Of An Embedded Flv
i came out of hibernation.

anyone know how to do this? it was easy in AS 2, but I need to be able to control an embedded flv's sound in a timeline in AS 3. I am well versed with streaming .flv's externally in AS 3 / Custom video players, but I want to try and avoid that in this case if at all possible.

any ideas peeps?

thanks.

View Replies !    View Related
Embedded FLV Volume Control
is there a way to control the sound of an embedded flv in a flash movie? I haven't seen any tutorials on controlling the sound volume for an embedded video vs. netstream.

View Replies !    View Related
Volume Of Embedded Video..
Hi,

Just wondering if it's possible to adjust the volume of an embedded video. I have segments of a video cut up to show as a demo reel and I would like to be able remove the (quite horrible) voice overs.

Help?

Cheers,
dft.

View Replies !    View Related
Controling The Volume Of An Embedded MOV?
Hey all, I was wondering if there was any way to control the volume of an .MOV embedded into flash?

I am going to make a VOlume slider for it.

I am mostly concerned on how to call it.

Any help is appreciated..

Thanks.

View Replies !    View Related
Volume Of Embedded Video..
Hi,

Just wondering if it's possible to adjust the volume of an embedded video. I have segments of a video cut up to show as a demo reel and I would like to be able remove the (quite horrible) voice overs.

Help?

Cheers,
dft.

View Replies !    View Related
Flash Embedded Video Volume
Hey,

I am having a few problems with embedding video into flash. I have everything setup and ready, encoded etc but when the video is embedded inside a movie clip and the movie clip placed onto the stage the volume of the video is extremely low, even when the audio in the original video is really high.

Can anyone help solve this? Is there some action script to perhaps set a higher volume or such? I have other bits of music, just mp3 files that have been imported and they sound fine.

Thanks!

View Replies !    View Related
[F8] Volume Slider - Not Working When Embedded
Hi there,

I believe I have a path problem. It always seems to be the case and I spend hours trying out various solutions.

I've been working at integrating a volume slider into a site I've been making for a friend.

I've done the following:

a) swf file that loads a header swf, content swf, and a footer swf.
b) in the header, I have the following code that loads a swf file containg my music player.

Code:
_root.header_mc.createEmptyMovieClip("musicplayer_mc",_root.getNextHighestDepth());
_root.header_mc.musicplayer_mc.loadMovie("flash_files/music_player.swf");
_root.header_mc.musicplayer_mc._y=0;
_root.header_mc.musicplayer_mc._x=0;
This works nicely.

c) I initially wanted to have several tracks available, and then decided against it. I however keep this code in the site, just in case I decide to add more selections. Here's the code to load the file containing the music track.


Code:
_root.header_mc.musicplayer_mc.createEmptyMovieClip("audiotracks_mc",_root.getNextHighestDepth());
_root.header_mc.musicplayer_mc.audiotracks_mc.loadMovie("audio/track1.swf");
d) Now in this file, there's a movie clip that loads the music. Here it reads:


Code:
// create a sound object
mySound = new Sound();
// attach sound file in the library where linkage has been set to 'track1'
mySound.attachSound("track1");
// play music
mySound.start("", 999);
Now my problem is that I can't get the path right. I really don't know where to change the path.

The path to load the music player is seen above, but I am not sure where to link it in the actionscript.


e) Lastly, the tutorial i used provided the code for a scroller that is 100pixels in length. I want to use one that is 25. I've tried a few things. Here's the code. I usually can figure out the code when it's explained. I however, don't know what two of the lines are referring to . He're the code:

Code:
onClipEvent (load) {
_parent.volSlider.drag._x +=12.5;
}
onClipEvent (enterFrame) {
vol = _parent.volSlider.drag._x+12.5;
_parent.mySound.setVolume(vol);
_parent.volAt = Math.round(vol)*4;
}
They are the lines that I've used 12.5 in. It doesn't give me nice percentages though.

I'd appreciate any help you can give.

Thanks,

Greg

View Replies !    View Related
How To Control Volume Of An Embedded Video
i've searched and searched and can't find anything about how to set the volume of an embedded Video object. anybody got a link or a tutorial?

i'm embedding the video because I have graphics/animations that need to sync with it, and i figured it'd be easier than setting up a bunch of cue points that trigger actions.

View Replies !    View Related
Volume Control For Embedded Video Objects
I have a video streaming application that uses a Red5 server. The stream from Red5 is represented through an embedded video object on stage. I need to be able to control the volume of this video object, but so far I've been unsuccessful despite following tutorials like this one: http://livedocs.adobe.com/flash/mx20...=00001486.html.

Here's the relevant code:


PHP Code:



function connect():Boolean {    this.nc = new NetConnection();    this.nc.onStatus = Delegate.create(this, this.ncOnStatus);    var connected:Boolean = this.nc.connect(streamAddress);    tt("connected?",connected);    return connected;}function initNetStream() {    this.ns = new NetStream(this.nc);}function playMovie(what) {    stopVideo();    initNetStream();        ns.setBufferTime(5);    this.videoContainer.attachVideo(this.ns);    ns.play(what);    _root.createEmptyMovieClip("vSound",_root.getNextHighestDepth());    vSound.attachAudio(this.ns);    var videoSound:Sound = new Sound(vSound);    trace(videoSound.getVolume());}function volumeChange() {    volumeFactor++;    if(volumeFactor >= 4) {        volumeFactor = 0;    }        videoSound.setVolume(33.3 * volumeFactor);} 




I have a button calling volumeChange onRelease, but when I trace videoSound.getVolume() in volumeChange, it comes up as undefined. However, if I trace videoSound.getVolume() after I define videoSound, it comes up as 100, but any attempt to use videoSound.setVolume in initNetStream is futile.

Thank you for reading this. I look forward to your suggestions.

View Replies !    View Related
MX2004: Embedded Video Volume Slider?
Hey,
The question my friends!
I'm working with embedded video in MX2004 pro. Not using the media controller component to control vid. What I want to do is create a volume slider for the vid. Problem is, I really don't know how to do this! Can't find any tutorials, and I'm pretty average with as2. Anyone got any ideas on this one?
Kind thanks,
Digiwax.

View Replies !    View Related
Controlling Volume
Hi,

I have a problem controlling sound object. I have a main movie that loads and controls submovies (external .swf) which contain flash movies with just sound. so basicly this project is a sound player. the problem is how to control the volume. I have tried 2 different approaches, but haven't got them to work. the first one was to use sound in a layer, but then you have no control to volume or any other property of the sound object. Then I tried to do it via action script and almost got it:

soundInstance = new Sound();
soundInstance.attachSound("mySOUND");
soundInstance.start(0,999);

works fine in a single movie, even when I export it.. but then when I load the movie clip from my main movie, nothing happens.. no sound.

Can anyone help me out?

Thanks,
Flashbuggy

View Replies !    View Related
Controlling Volume..
Hi all,
At the starting of the movie, I am attaching a sound name "bg"..
at the middle of the movie on click of a button I am attching a voice over id "vo"..

At the time the voiceover loads I am trying to decrease the volume of the "bg" to 10%.. But both the sound is getting reduced..

code..

on(release){
voice = new Sound();
voice.attachSound("vo");
voice.start();

bg.setVolume(10);
}

Is there any way to control one of the sounds volume..

Pls Help..
shibs_5..

View Replies !    View Related
Controlling The Volume
I am having trouble scripting for volume level control

What I have is main flash starting with external music in .swf format.
What I need is...
when different external "video" loads, I want the first frame of the "video" to turn down the volume level of loaded music .swf file.

is it something like _root.xxx.volume 0 (where xxx is instance name)?

how do I go about doing this?

Help needed badly.
Thx in advance

View Replies !    View Related
Controlling Volume In MX
How do I control the volume of a audio file in FX? I tried giving the sound clip and instance name but I don't know the code to control volume.

View Replies !    View Related
Controlling Overall Volume
I was wondering whether it's possible to simply control/mute the entire volume of a flash movie using ActionScript?

All I can find is how to limit single sound objects, but this needs to be universal to flash movies.

If so, is it possible to do it from an external movie/javascript snippet on the same page as the movie is embedded?

View Replies !    View Related
Controlling Volume Of A MC
Hello,
there is anyway to control volume from a MovieClip that contains audio?

or dows anybody know if would be possible to load a SWF instead of an MP3 into a Sound Object?

Any suggestions/help please?

Thanks!

View Replies !    View Related
How Do I Get The Play, Stop, Volume Controls To Appear In My Embedded Flash Object?
Hello,
I want to show .swf or .flv videos on my website--like youtube.com. I want to use the standard Flash Player object embedded in a web page, however, I cannot seem to find the exact params that make the standard controls appear (ie, Play, Stop, Pause, Volume, etc). I just want to show a video and have the Play, Stop, Pause, Volume controls visible at the bottom. What do I need to do to get these controls to appear?

Here's my current code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="

View Replies !    View Related
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

View Replies !    View Related
Controlling Volume Using Actionscript
can anyone help me here, i am in a tizz.

i need to control my sound using actionscript, not the envelope, for it loops, fading in and out etc. there are other layers, with other sounds. i have attached a variable, and a name to the sound i need to control, but it is controlling all other sounds, in other words, it is working as a 'global' control.

this is the script i am using:
name = new Sound();
name.attachSound("linkname");
name.start(0, 1000);
name.setVolume(20);

in following frames i may put:
name.setVolume(50);

i also have a fade out movie .. which is also 'globally' controlling all else.

what am i missing? what am i doing wrong?

thanx
bai

View Replies !    View Related
Controlling Volume By Key Control
What method is used to control background music using key control ?

for example - 0 = off, 9 = highest level

View Replies !    View Related
Controlling 2 Sounds' Volume
Greetings all.

I'm having a hard time controlling 2 separate sounds' volume. I'm trying to turn down the main looping sound once another sound effect begins. But once I do, it effects both of the sounds volume. Is there anyway to decrease the volume of 1 sound while not effecting the other?

Here's my attempted code:

On frame 1:
s = new Sound();
s.attachSound("intro");
s.setVolume(100);
s.start(0, 999);

On frame 50:
t = new Sound();
t.attachSound("ballgame");
t.setVolume(100);
s.setVolume(10);
t.start(0, 0);

Any help would be greatly appreciated.

Thanks in advance,
Tony

View Replies !    View Related
Controlling System Volume
Is there anyway to control the sytem volume through Flash? I can create a volume control for a movie however that really doesn't effect the system level. Any suggestions?
Thanks.

View Replies !    View Related
SoundObject: Controlling Volume
I have three frames in my main timeline. The first contains the preloader, the second is the entrance animation and the third is a menu loop. In the second frame (entrance animation), I've place this script on the main timeline in an "actions" layer:

backgroundAudio = new Sound();
backgroundAudio.attachSound("movieAudio");
audioVolume=70;
backgroundAudio.setVolume(audioVolume);
backgroundAudio.start(0, 99999);

In the third frame of the main timeline (menu loop), I have controls for the audio (ie. stop, play, volume, etc...) On the volume down button I have this script:

on (release) {
audioVolume=(audioVolume-5);
if (audioVolume<5) {
audioVolume = 1;
trace(audioVolume);
_root.backgroundAudio.setVolume(audioVolume);
_root.gotoAndStop("loop");
} else {
trace(audioVolume);
_root.backgroundAudio.setVolume(audioVolume);
}
}

The problem is, the first time I hit either the volume up or down buttons, it acts as though the initial volume is 0. In other words, the value I set for "audioVolume" (70), in the second frame, loses it properties when a button is pressed. It does start playing at 70 though if untouched, and after a button is pressed and it resets to 0, then all buttons function properly, but the first press destroys everything. How do I combat this?

Thanks for your time and help.

View Replies !    View Related
Controlling Sound Volume
Hi all,

I don't know that this is a newbie question, but I don't have a lot of Flash experience.

I followed Tim's tutorial here, and I embellished it a bit.

http://www.flashkit.com/tutorials/Au...1008/index.php

I want to add a volume control to it, but because of all the encapsulated movies that call each other and load, I am confused. It would be nice if I could control the master volume, but it looks like you can only control the volume of a sound object. That presents a problem, because the music here is streamed in the main timeline of one of the SWFs.

Is there a way to control volume if there is no sound object?

Thanks!

-Chris

View Replies !    View Related
Controlling Volume Without A Slider?
Hey all,

I'm looking for a way to control the volume of a streaming audio file *without* using a volume slider (i.e., having volume up/down buttons that will evaluate the current volume level and increase/decrease the volume by a given percentage each time they're clicked, and simply do nothing at all when the minimum and maximum volume reaches 0% and 100% respectively).

I've been playing around trying to figure it out, but I'm getting nowhere. Here's what I have thus far (A.S. editor hasn't complained, so I guess that's a good thing ):


// volume down
on (release) {
my_sound.getVolume();
if (my_sound.getVolume()>=0) {
stop();
} else {
if (my_sound.getVolume()<=1); {
my_sound.setVolume(this.my_sound.getVolume - 25);
}
}
}

// volume up
on (release) {
my_sound.getVolume();
if (my_sound.getVolume()<=100) {
stop();
} else {
if (my_sound.getVolume()>=0); {
my_sound.setVolume(this.my_sound.getVolume + 25);
}
}
}

I know "my_sound.setVolume(this.my_sound.getVolume + 25);" won't work, it's just there to show that I want to increase/decrease the volume by a quarter of the total each time.

Help would seriously be appreciated. Thanks guys!


Ryan.

View Replies !    View Related
Controlling A Video's Volume In AS3
I'm doing the right thing and abandoning AS2 altogether, but I keep getting stuck on things I used to know how to do. The latest is controlling a video's volume. Anyone know why this doesn't work?

Code:
var so: Sound= new Sound();
var audioChannel: SoundChannel= new SoundChannel();
var audioTransform: SoundTransform = new SoundTransform();
var video: Video = new Video(340,255);
var nc: NetConnection = new NetConnection;
nc.connect(null);
var ns: NetStream = new NetStream(nc);
var meta: Object = new Object()

meta.onMetaData = function(meta:Object)
{
trace(meta.duration);
};

ns.client = meta;

ns.soundTransform = audioTransform;

addChild(video);
video.attachNetStream(ns);
ns.play("flv/clip_01.flv");

button_mc.buttonMode = true;
button_mc.addEventListener(MouseEvent.CLICK,mute);
function mute(e:MouseEvent)
{
audioTransform.volume = 0;
trace("hit");
}
So obviously this doesn't work. What am I missing?

Thanks in advance.

View Replies !    View Related
Controlling A Video's Volume In AS3
I'm doing the right thing and abandoning AS2 altogether, but I keep getting stuck on things I used to know how to do. The latest is controlling a video's volume. Anyone know why this doesn't work?


Code:
var so: Sound= new Sound();
var audioChannel: SoundChannel= new SoundChannel();
var audioTransform: SoundTransform = new SoundTransform();
var video: Video = new Video(340,255);
var nc: NetConnection = new NetConnection;
nc.connect(null);
var ns: NetStream = new NetStream(nc);
var meta: Object = new Object()

meta.onMetaData = function(meta:Object)
{
trace(meta.duration);
};

ns.client = meta;

ns.soundTransform = audioTransform;

addChild(video);
video.attachNetStream(ns);
ns.play("flv/clip_01.flv");

button_mc.buttonMode = true;
button_mc.addEventListener(MouseEvent.CLICK,mute);
function mute(e:MouseEvent)
{
audioTransform.volume = 0;
trace("hit");
}
I've got like a stray sound object in there that I thought I might need, and a SoundChannel as well. Anyway, obviously this doesn't work. What am I missing or doing wrong?

Thanks in advance.

View Replies !    View Related
Controlling External .swf Volume
I am trying to control the volume of numerous external .swf's containing audio from the root timeline. I have the external .swf's loading into a hidden MC on the main timeline. I would like to have a sliding volume control that will increase and decrease the volume. I have checked past threads and have only found postings referencing sounds loaded with the main .swf. Can anyone give me some advice?

View Replies !    View Related
Controlling Volume Of External .swf's
I use an mp3 player that loads external swfs as opposed to actual mp3s. They load just fine, but I can no longer control their volume with my slider. I created a globalsound Sound object that worked when loading mp3s. Does anyone have a way to control the volume of a movieclip?

View Replies !    View Related
Controlling Volume For The Entire .swf
Last edited by felisan : 2005-03-16 at 14:11.
























hi flash-sharks.

i'm doing a .swf-file containing a video.

and then i am to do a mute button, but how do i mute the sound of a video, without stopping it?

i can use the stopAllSounds-action, but then i cannot start the sound again...

anyone who can figure this out for me ?


thanks
felisan

View Replies !    View Related
AS3 - Controlling Volume (not Typical)
Hey guys,

I'm using a Loader to place an external SWF into my project. The external SWF has a Video object on it that plays through when the clip is loaded.

I'm trying to control the volume of the externally loaded SWF. I've tried setting the .soundTransform property of the loaded SWF and the loaded SWF's parent, but none of that didn't work.

Anyone know what's going on here?


Thanks!!

View Replies !    View Related
Controlling Button Volume Via AS
Hi Folks,
I've been searching the forums trying to find a way to create a global volume controller for my sound effects (notably the button sound effects) but was unable to find a solution, so I came up with my own and I figure I'd share.

First of all, I really don't like the idea of having to use code for my button event sounds unless I really need to. Adding sounds via flash's timeline seems so much cleaner to me. The problem is that you can't use the Sound object to control timeline sounds that are in buttons (why, oh why??). However, you can control timeline sounds for Movieclips... the solution? Make each button state a Movieclip and add the timeline sound in the Movieclip! From there, its really simple - create the sound object as you normally would:

var s_sound = new Sound(target_mc*);
s_sound.setVolume(20);

*Note: target_mc is the movieclip containing your interface (which holds the buttons).

This will allow you to controll all sound events (in the target_mc) added via the timeline. If you want to add other sounds, (say background music) and have a separate controller for that, you'll need to make sure the background music target mc is outside of the s_sound target mc - or it will get grouped with them.

Hope this helps!
Shu

View Replies !    View Related
Controlling Volume Of Sound
hi
i have a movie with a lot of sounds in different scenes. The sounds are in different layers. How do i control the overall volume of the whole movie?

Thanks
i

View Replies !    View Related
Controlling Volume Of Loaded Swf
I have a movie that is loading 2 external swf files using loadmovie and loading into empty mc's. I want to set the volume of one of them to 0 but keep the movie playing. Later in the movie, I want to bring the volume up to 100. I am lost and don't know where to start.

Thanks

View Replies !    View Related
FSCommand For Controlling Volume
Hello,

can anyone help me out with an FSCommand that will control volume for something else on the page than just the flash? Like a media player or the ehntire computer>

Thank you

View Replies !    View Related
Controlling The Volume Of A Audio Track
i've tried this;

new Sound();
s.attachSound("Restaurant2");
s.start();
s.setVolume(50);

but it controls ALL the audio playing in that movie, all i would like to do is set the volume for that particular track disregarding the others, is this possible...

nice one

leroy

View Replies !    View Related
Controlling Volume On An Imported Clip
I've imported a .mov file into my flash document. What I'm trying to do is make a volume controller for the imported movie. I know how to control sounds that are imported on their own and I know that I can splice the video from its sound and do it that way, but is there an easier way? Please help!! I'm looking for a quick fix. I would hate to write a bunch of code when I don't have to.

View Replies !    View Related
Controlling Volume/Pan From External SWF Files
Greetings (again). I have a flash file that loads an external SWF which has audio. I used:

mysound = new Sound();
mySound.attachSound("beat");
mySound.start(0, 9999999);
mySound.setPan(0);
mySound.setVolume(100);

View Replies !    View Related
Sound Object - Controlling Volume
Perhaps this should be posted in the "sound" forum, but it doesn't seem to get as much attention, so I thought I'd start here. I have 2 sounds I'd like to use globally for mouse overs.

For main category buttons, I'd like both sounds to play.
For sub category buttons, I'd like only one sound to play.
I have that part working fine.

The part I don't have working fine is controlling the volume. I can't seem to control the volume independantly. I'm sure it has something to do with new Sound(TARGET??); but I can't seem to figure it out. Since they are both 'global' sounds I'm not sure what to do.
Any thoughts?? I know I could edit the sound I want at 50% but...I'd like to call it at 75% if I want or 100% if need be. Know what I mean?

This code is on the main timeline.

lrgmouseOver = new Sound();
lrgmouseOver.attachSound("lrgmouseOver");
lrgmouseOver.setVolume(100);

smlmouseOver = new Sound();
smlmouseOver.attachSound("smlmouseOver");
smlmouseOver.setVolume(50);

This code is for main category buttons.

on (rollOver) {
_root.lrgmouseOver.start(0, 1);
_root.smlmouseOver.start(0, 1);
}

Thanks a ton.
Blue

View Replies !    View Related
Controlling Volume Of Audio With Keyboard
This is a bit of a crosspost but no one in audio came up with anything.

What I would like to do is control the volume of the movie with via the keyboard, say the '+' and '-' keys. Just wondering the best way to do this.

Thank you

View Replies !    View Related
Controlling Volume With Mouse Position
Hi,

I did just post this in Flash mx forum but it might be better sutied in here..

Is there any way of making the volume of a piece of music increase, the closer the mouse gets to a certain spot on the stage (or perhaps a movie clip..)?



thanks for any help

Marc.

View Replies !    View Related
Controlling Windows Volume With Flash
anyone have an idea on how to control the system master volume from a flash movie?
many thanks

View Replies !    View Related
Controlling Master Volume With A Slider
Hello everyone,

I'm building a tutorial with voice-over through the whole thing, and I need to include a volume control. Craig Campbell at Learnflash.com has a tutorial that provides most of the code i need.

The problem is in the first two and last few lines of code. His code is for a slider controlling the volume of an mp3 that is imported with the URLRequest class, whereas because my sound synchronizes with the animation I need to control the sound across the whole stage.

How can I change this code to control the sound on the whole animation?


ActionScript Code:
var voice:Sound = new URLRequest("sound.mp3");
var sChannel:SoundChannel;

var dragging:Boolean = false;
var rectangle:Rectangle = new Rectangle (0,0,50,0);
volume_mc.slider_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragIt);
stage.addEventListener(MouseEvent.MOUSE_UP, dropIt);

function dragIt(e:Event):void {
    volume_mc.slider_mc.startDrag(false,rectangle);
    dragging = true;
    volume_mc.slider_mc.addEventListener(Event.ENTER_FRAME, adjustVolume);
    }

function dropIt(e:Event):void {
    if (dragging) {
        volume_mc.slider_mc.stopDrag();
        dragging = false;
        }
    }

function adjustVolume(e:Event):void {
    var vol:Number = volume_mc.slider_mc.x / 50;
    var sTrans:SoundTransform = new SoundTransform(vol);
    if (sChannel != null) {
        sChannel.soundTransform = sTrans;
        }
    }

I have been trying to substitute SoundMixer in for SoundChannel in various ways, but I only get errors or no result.

Please help!

View Replies !    View Related
Controlling All Audio/video Volume
is there a way to control global audio volume in as3 ?
I've several video and audio streams playing

and I want one volume slider to control all of the video and mp3 streams ...
but it seems that audio for flv is controlled differently as mp3 ?
or did I miss something

View Replies !    View Related
Controlling Volume On Multiple Sounds
Dynamic Flash Sound Importing
I totally understand how all this works now. Its really cool, but there is one thing I cannot get it to do.

When you dynamically import sound you have a bit of code like this:

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

Then, when I want to use it I use this:

soundtrack01.start(0, 99999);

Ok, with me so far?
Right, if you wanna stop that SPECIFIC sound, you just need to do this:

on (press) {
soundtrack01.stop("soundtrack01");
}

I know putting the "soundtrack01" in brackets is IMPORTANT otherwise ALL sounds will stop.

However, I am using multiple sounds and sounds on buttons so I cannot just stop them all, I need to turn them all down to 0, therefore I use this code:

on (release) {
soundtrack01.setVolume(0);
}

This works fantastically but it sets all sounds to 0. I want to set all sounds independently so the next logical step is this:

on (release) {
soundtrack01.setVolume("soundtrack01",0);
}



But this turns ALL sounds to 0!!! and this is bad...

I am at my wits end with this... PLEASE HELP!!

View Replies !    View Related
Controlling Volume Through Action Script
Hello Everybody,

I want to know how the volume of an swf can be controlled through action script. How can one mute the swf through action script. I would appreciate any help with this

View Replies !    View Related
Controlling Volume Of Audio On A Frame..
Hey guys,

If I put audio on the timeline, on actual frames, how can I adjust the volume of that particular volume? I am not using a Sound object, just importing the audio to my library, then selecting the frames I want it to play during, and setting it to stream or event.

I cant figure out how to make the volume louder.

Thanks!

View Replies !    View Related
Controlling The FLVplayback Component Volume
Hi there,

I have a FLVPlayback component which I have modified to the core.There is one problem with the volume slider. Im using Flash Professional 8 with XP, and the skin Im using is "steelExternalAll". Suppose I load some file into the contentPath, it plays, and I drag the volume slider up (100%) and down(0%) for a couple of time I get a bug. The bug is that when Im finally in the down state, with 0% I still hear the sound which was in the previous status, say 38 or 50%. And it happens in the reverse too. Why is this happening? Can i resolve it?

I tried doing this using a fresh FLASH file, still the result is the same. It happens once in a 10 times, but this surely is a defect i need to handle. I dont think I have enough API's to do something serious. Can anyone help me out?

View Replies !    View Related
Slider Bars Controlling Volume
Hey I posted yesterday about making my Slider Bar control volume, and I'm an idiot, so that tutorial taht was posted was not helpful.....If someone can teach me how to do it, my AIM sn is PunkieDrewster. Thanks!

View Replies !    View Related
Controlling The Sound Volume+external Swf
Hello! Is it possible to control the sound volume of a external loaded swf?
I have a swf that has some animations with sound on the timeline, I load this swf using the moviecliploader class and I would like to control the sound volume of the whole swf! Is that possible?

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved