ActionScript 2.0 :: Control The Volume Of A Movieclip Directly Without Using The Sound Class?
Jun 14, 2010
I was wondering if there is a way to control the volume of a movieclip directly without using the sound class? Or is there a way to control the volume of the entire swf?
I have an application with a collection of sounds in the timeline. One sound file is recorded at a slightly lower volume than the others. I know I could change this in Audacity but I'm wondering whether I could attach a line of actionscript to its button to raise its volume slightly.I know its possible to do this when playing sounds with actionscript directly from the library, but that would be too big a departure from the development style used.
If I have library song playing using a simple code like: var mySong:Song = new Song();mySong.play(); How do I use a button to control its volume so that each time it is clicked the volume goes up or down by a little.
I'm having issues with controlling multiple sound volumes in flash. What I need to have happen is a Background music softly playing while a voice over is also playing.
This is what i have in the first frame of my main timeline
Code: firstSound = new Sound(BGMusic_mc); firstSound.attachSound("LatinRockMusic"); firstSound.setVolume(10);
[Code]...
but when it starts to play the voice sound the volume jumps up to 100. I need the first sound to stay at 10 and the voice sound to be at 100.
I have a timeline with a sound in it set to sync because I am scrubbing the main timeline.... I now want to control the volume of the sound in the timeline..is that possible in AS3??
sometime like : var my_globalSound:Sound = new Sound(stage); that of course doesn't work, but how would I get access to the sound set in the timeline...
I have to buttons that control the volume. They work fine just that I want to stop when the volume hit 100 and also when you go down to stop at 0. Right now it will go up and down then start the opposite way. I am not quite sure how to stop that(with a if statement).
I have some sounds in movie clips, this is because that is the only way to be able to select SYNC Stream mode (to keep the movie in sync with the narration). Thus I don't want to use Sound Objects because they can get out of sync... Is there any way to control volume (so I can mute) without using Sound Objects?
possible to control the volume (and other properties) of a sound that has been generated with Actionscript using the SoundTransform object.I've got the code below generating a sound, but modifying the soundTransform of the _channel object does nothing. I can multiply the amplitude variables by a number 0-1 to change the volume, but I would much rather use the soundTransform object if possible.
I have a few sounds on my main timeline for syncing to an animation. Does anyone know what code I would use to mute the sound on the main timeline?
FYI...I will not be using linking from the library for this project, the sound WILL be on the main timeline.
Here is some code which does nothing and traces undefined...so as you can see...I'm not sure where to go with this. I've placed a mute button in my file, but I need help on knowing how to control the audio.[code]...
I've got a presentation that features an audio loop for background music and streaming audio on the timeline for the voice over.When I try to lower the volume of the background music (sound object), it also effects the voice over (streaming).I'm a total novice, so try to use laymen's terms.[code]And this is on the Frame that contains the movieclip with the voice over.I'm trying to fade the background music ONLY:[code]
I'm building a video player and am kinda stuck at the volume slider part. It's a YouTube style vertical slider, meaning if the slider is in the top position volume should be 100% and if the slider is dragged to the bottom position sound should be 0. Currently it's doing the opposite of what I want :(
Dragging the slider down will make the sound louder, while dragging up lowers it.
Here is my code below dealing with the volume slider.
[Code]....
The (-4) is an offset value so when you drag it all the way to turn it off, it's 0 and not 4. I need to reverse this somehow, so the traces above will swap... going down will make userVolume = 4 and going up will make it 30.
I have a Bullet class - which defines and controls the firing of bullets (and works perfectly in all ways) - and now I'd like to add to it the ability to detect if it has hit a spaceship-movieclip sitting in my main .fla's timeline - what's the proper syntax to do this?
here's my code:
Code: public function moveBullet(e:Event): void { this.y = this.y - 20; // moves bullet up-screen, shooting vertically if (this.y <= 0) {
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!
Is there a way to configure/control the volume level of an mp3 that automatically plays in your flash segment? In other words I'd like for the volume to play at a 30 or 50% level.
I am doing a elearning project in flex and it consist in a secuence of swf files and a player that load it based in a xml file, the problem is all swf files contents narrations and I need to control the volume of narrations from the player interface, anybody know how I can control the volume of a swf file from flex??
I am trying to write a very simple mp3 player with a volume control slider. My trace statements show that the value of the mp3 volume changes when the slider is moved but the actual volume does not change. I have attached my fla and here is my code:
i'm triying to do a slider bar for control volume but all scripts are for vertical or horizontal movement, but i need do it with a light inclination i have been thinking to give to the limits line a value of x an y for upper possition and other value for x and y for lower position but i don't know to do it.
I'm creating a flash presentation that contains some externally loaded video's (flv), voiceovers and a background music. I would like to be able to control all these audio streams with one control. So basically I'd like to change the volume of the entire movie. Is this possible?
I know there's something like the Sound object with a setVolume() method, but that's only to control one stream as far as I know.
I'm super stuck on this (getting into the days catagory!) before i start, here's the link to what my XML MP3Player functions like atm;[URL]..The foundations of the AS for this player are from the gotoAndplay.com tutorials, I'm having two problems with adding this volume slider control,
Firstly the SliderBar onload position, it is positioned on the far left of the screen, you can drag it towards the player, once you get it with'in the player it functions correctly moving between the designatd left and right x values correctly, but how can i get it to load into the player rather than out to the left?
And Secondly, by this stage you may have noticed no sound, i've tried alot of different things but to no avail?
I'm trying to control the volume of an flv in a video player I'm making. I want it's volume control to be independent of any other content on the page. The Video object is in a Component if that makes any difference.
I am able to adjust the volume of the root (aka MovieClip(this.parent).soundTransform ) but I cannot do it to the component itself.
I have tried applying the SoundTransform to the component itself (which is not a MovieClip I know), I have tried placing the Video object in a MovieClip inside the component and attempted to adjust the volume that way with no success...(obviously there's a lot more code than this)
Code: _videoDisplay = new Video(); _videoVolume = new SoundTransform(0); // just using 0 so I can tell when it works this.soundTransform = _videoVolume; // *this refering to the component
i'm triying to do a slider bar for control volume but all scripts are for vertical or horizontal movement, but i need do it with a light inclination i have been thinking to give to the limits line a value of x an y for upper possition and other value for x and y for lower position