Professional :: .setVolume - Fade In And Out The Volume?
Jun 21, 2010
i am sperimenting with new types of sound implementing in my site (normally i used to import the sound in the flash library and use id from there)
i no longer use the sound in the movie itself but i load an external .mp3 file ..
i wanted to make 2 buttons that put the volume of the sound o 0 and 100 and it works for me but i wondered if i can make the same thing but with a fading effect ..
i want the button to bring the volume of the external file to 0 but not istantly .. it should fade out slovly ..
I have this mc in my movie, and I want the volume of a certain sound to increase/fade up as the cursor gets closer to the mc, and also want it to decrease/fade down as the cursor gets away from the mc.
So my flash skills are pretty rusty. The project I'm currently working on is updating my portfolio site and I have a navigation bar that I want to fade in, click on a link, fade out, then go to the specified link. I've got the animation working the way I like, however I cant get the links to work correctly. I've used the standard getURL commands, but then every button goes to the same link, not different ones.
What Action Script 3.0 coding do I need to make the animation play the way I've described and have each button go to it's own link?
i have a flash document that contains two wav file in the library with ID name "soundloop1" and "soundloop2". and there is no other stuff except for the following code on the first frame:
_root.mySound1 = new Sound(mc1); _root.mySound1.attachSound("soundloop1"); _root.mySound1.start(0, 50);[code]....
how come the output is 100(and it sounds like 100 too...pretty loud ) ?? what did i do wrong?
I have 2 images that need to fade in and fade out so after 5 seconds image1 slowly begins to fade out while image2 slowly begins to fade in. My first image does not fade in because on the start of the flash movie I want to directly see the first image. But when image2 is done (so the whole movie is almost done) and it's start fading out.... I get to see the background (just a black empty background) while I actually want to begin fading in image1 (so looping the 2 image constantly).
So how can I immediately see an image on the start of the movie and still getting a fading in effect of the first image when the movie is almost on its end (so during the fading out of the last image)?
I made an earlier post which has been answered and everything works perfectly, but now i need a hand getting my images to fade in and fade out via code. I have 12 different images on 1 layer (bad thing i know but i dont know how to fix this).
My images pop up when they go over the respective button.How can i get the image to fade from 0 opacity to 100 in about 1.5 - 2 seconds? and then fade out again upon moving the mouse off of the button?
I have had a look at alot of different tutorials but none have helped me with the code, they have all been with keyframes. i cant use keyframes due to everything being on the one layer. also i think the code will be a bit easier for me to understand.
I've created a small music player with a sliding volume control. I'm having trouble with the volume. Though it does control volume properly, if I set the initial volume to less than 100%, the volume always starts at 100% until I move my mouse over the player. At that point, the volume changes to whatever the initial volume is set to.Is this a flash bug, or am I missing something? Here is the affected code (code for other buttons/functions omitted for brevity):
var song_initvolume:Number = 100; slider_1._x = groove_1._x + song_initvolume; playSong(0,song_play);[code]....
I'd like to be able to set the volume at say 50%, but the above mentioned behavior happens each time.
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'm well & tired of the volume of crashes from Flash CS5. Some are more predictable, like now every time I try to import an FLV it's crashing, so I'll try repairing permissions, and rebooting the computer. Some are more random, like I'm moving something in the Library and it'll just crash out. It's really a terrible experience working in the Flash IDE. I love Actionscript 3, and the Flash Player seems pretty stable. But my God, what do you do when Flash starts bugging out?
I've inserted an audio file into my flash movie and I wondered if there was an easy way to add some volume control and/or an on/off audio button to the movie? Or would this have to be scripted using actionscript?
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 an issue with an Mp3 player that I've built. The volume controls work fine in the original mp3 swf, but then when I load it into a movieclip in a different movieclip, it no longer works. I've tried the lockroot function, defining the sound class to "this". See the last function for the vol controls. Let me know if it's more convenient to get the original .flas, I can give a link to the source.
see my code below:
this._lockroot = true; function getSound(url:String) {sound.stop();delete sound;sound = new Sound(this);sound.onLoad = function(success:Boolean) {
I've got a serious of games which in turn load off a main main swf.I have mute and unmute buttons on the main menu and the same buttons in each game.When I unload/load a game I want the volume to stay as it is so they player doesn't have to keep turning the volume off. AudioOff is the button shown when the volume is off and AudioOn is the button shown when the volume is on.The code I've got now keeps the volume on or off through the games but the buttons aren't showing up correct with this code..
if (SoundVolume.volume == 1) { AudioOn.visible = false;[code].....
It seems right to me but I don't know. The movie button slides down the slider bar but it just doesn't affect the volume. Going to try to attach my FLA to offer better insight. Just tried to upload it and no matter if it's FLA or zipped FLA, it says it failed.
Mac OSX 10.4.11 - CS4. I have a supplied video.flv that I have in Flash with a skin control and exported as video.swf and inserted into a GoLive site, all is well apart from the excessive sound. The volume controller is defaulted to max and I would like to reduce the default volume by about 50%. Is this possible to do in Flash before exporting the video.swf.
I have this site I'm doing in Flash with an embedded video.The site has background music that is loading automatically, but when the embedded movie loads, the volume on that is mixed in witht he sites music.If you mute the sites background music, it mutes the video sound as well. Make sense?How can I seperate them out or make the sites background music not load on that particular page.
I am creating a custom flash video player for my friend's wife's surprise 40th birthday party. I was progressing through and everything was working fine, but now the seekbar and volume bar handles are completely gone. I was working on doing some buttons to load each video segment when I realized the missing handles. My actionscript is below:
import fl.video.*; var flvPlayer:FLVPlayback = new FLVPlayback();addChild(flvPlayer); flvPlayer.playButton = playbtn; flvPlayer.pauseButton = pausebtn; flvPlayer.seekBar =
how one goes about changing the colour on the volume bar for playing videos like youtube does as the volume slider is moving. I don't think I need to go into depth using the graphics classes. What I'm looking for are ideas when a user changes the volume while playing a video, say in youtube, while dragging the volume control, the colour of the background bar changes. I've seen lots of help about creating volume bars for videos, but I don't see how to change the volume bar colour as the volume slider is moving.
The problem that I am having is that stopping sounds using a basic "mySound.stop()" command, or using "setVolume" to fade it out instead - causes clipping. I understand that, technically, it is not "clipping" (this is part of the reason why I can't find any forum threads about this). What is happening really is that the sound card is interpreting going from an average dB level to zero makes a square wave, and thus the popping sound. For example, imagine that each dot is a sample in a WAV, and as you can see the straight vertical line occurs when the sound is stopped:BUT, what I am confused about is that this does NOT ALWAYS happen. I find it hard to believe that I am just getting lucky and hitting the stop button exactly at a moment when the wave is at zero (or really close).
I am trying to fade in a symbol (movie clip or graphic) from left to right (have the actual image start fading in from one edge to another - not the actual image moving). This symbol was originally a drawing object which was imported and then converted to a symbol. I tried by settng a frame with alpha set at 0 and 30 frames later setting alpha at 100, and then in between these frames creating a linear gradient. However, the graphic is actually 5 pictures put together - Imagine " M E T R O " as pictures put together. But when I do the linear gradient it will it on the " M " and then also a separate linear gradient on the " E " and so on....it will not do 1 linear gradient so as to start out dark on " M " and end up white on "O", it will do do a linear gradient for EACH letter. I tried grouping, ungrouping, setting layers, highlighting different parts, etc. but to no avail.
I have 3 buttons going around in a circle, in the middle of this circle I want a specific image to fade in for each button when you roll across it then fade out when you move off the button. I also want the button itself to change colour slightly when you roll across it. I've not had much look so far without the use of actionscript, but even with using it I'm not getting very far, I also seem to have a problem where once I have an image appear on the rollover of abutton that the image becomes part of the button, ie instead of the image just appearin when you roll over the button it appears when you roll over where the image should be appearing.
Has anyone encountered the alpha fade in CS5 not working when fading a graphic out? Example, I want to fade out a graphic symbol from 100% to 0%. When I try to make my fade to 0%, the alpha slider snaps to 100%.
i need to do another one, exactly the same, but it will have a rolling picture (4) when 1 button is rolled over.
I can set it up to fade in when the mouse rolls over, but i am just wandering how to set it that i can make 4 images fade in after eachother after a space of about 3 seconds. If you need code i am more then happy to give what i have at the moment. i am assuming i will need a timer in there but i am not very good at AS3.0 so i do not know how to write it
I can't get a simple fade to work, despite research and trial & error.My procedure (FYI):
- I create a layer just for this fade object. - I drag a .gif image from the Library to the stage in this layer. - I convert it to a symbol (tried Button & Movie symbols.Graphic symbol not an option because I need to reposition the object programatically). - I select the first frame in this layer, select the symbol, and set its Alpha to 0%. - I select another frame in this layer and Insert Keyframe. - I select the symbol again and set its Alpha to 100%. - I select the range of frames from start to end keyframe, I right-click this range, and I insert a Classic Tween (I've tried Motion Tween as well).
Bottom Line:
-When I try Control --> Play, the fade works perfectly. -When I try Control --> Test Movie, the fade never happens and the symbol remains invisible.
Why would the fade work in Play but not in Test Movie?What step is missing/wrong in getting this fade to work?
I just need to work on a roll out effect, I have it so if the mouse rolls of the button before the second image is up, it fades out. That is good. But when the second image IS up, the mouse rolls off the button and then the 2nd image fades out, but the 1st images shows up and also fades out. How can I prevent this from happening so it is always only the visible image that will fade out.