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




How Fade The Background Sound?



Hello everyone, this is my first message here.

I am starting a project, and I have been having a bit of trouble. I am fairly new to flash.

I have made a list of scenes, added a background sound in the first scene. And it loops in the background, which is what I want.

But when a user clicks on a button in another scene, I want this sound to fade away. I Actually want it to quietly play int he background, while a new sound plays in the foreground. Then when the user clicks out of the current button, I want the background to fade back up.

Also, While the foreground sound is playing, i am trying to make a pause, play, stop button(i know those), but i want to have a timeline slider that the user can click and drag in order to rewind the sound.

Anyone know how I can do this?

Thank you



FlashKit > Flash Help > Flash MX
Posted on: 12-25-2004, 01:15 AM


View Complete Forum Thread with Replies

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

Making A Background Music Track Fade Out To Another Sound When An Object Is Clicked
Hello everyone,
Im fairly new to flash and have been creating a website over the past few days with it. I was trying to get and effect where there is a background music track playing and when an object is clicked on this background track fades out to another audio file and then when this file is finished it fades back into the original background track. Any ideas on how to do this? Your help is much appreciated.
Kind regards,
Brian

Sound Fade In/fade Out - Fine, But Not First Time
I followed Kenny Bellows tutorial on fade in/fade out: http://www.kennybellew.com/
Everything seems to work fine, except it won't fade out the first time i click. After the first time, it fades fine.
Anyone had this problem?

Code:
this.onEnterFrame = function () {

//fade out and in
if (daveFadeOut == 1){
daveSoundVolume = daveSoundVolume - 1;
daveSound.setVolume(daveSoundVolume);
}

if (daveSoundVolume < 1){
daveSoundVolume = 0;
daveFadeOut=0;
}
if (daveFadeIn == 1){
daveSoundVolume = daveSoundVolume + 1;
daveSound.setVolume(daveSoundVolume);
}
if (daveSoundVolume > 29){
daveSoundVolume = 30;
daveFadeIn=0;
}
//finish fade out and in
}
Cheers,
Dave

Sound Fade In-loop-fade Out
i have a music loop in my animation that needs to fade in then loop untell a button is pressed. i've got it to fade in and loop but i don't know how too make it fade out.

on the frame the music starts i have the sounds proportys set to
Effect:fade in
sync:start|loop

is there a whay to do this non dynamicly? if no then:
How do i make my sound have an instance name so i can use the setVolume() thing?

Fade In And Fade Out Sound Without A Button
I need to do something that has to be easy stupid, but I can't find a thread or tutorial on it with my specific needs.

I want to fade in a sound, then later on fade it out on a specific frame WITHOUT using buttons. It needs to happen automatically on the timeline. I have added sound to buttons with actionscript many times before, but there is no button in this case, when the playhead passes frame 10 I need the sound to start fading in and then loop (at volume=100) until the playhead reaches frame 580 where I need for the sound to start fading its volume back to zero.

Can anyone help me. I even spent HOURS in Barnes and Noble reading the flash mx bible and Moock's book with nothing that attached what I need to a frame event rather than a button press or release event...

Thank you in advance to whomever can help... I know this should have been easy for me to get, but I just don't get it.....

Eric Ling

MULTIPLE SOUND (fade-in/fade-out)
Hi guys,

I have this problem. I would like to have background track playing on a flash-site. And when you click to load in en external page I would like another track to fade-in to "join" or "add" to the previously existing track with, lets say a little guitar flicks. And of course, fade-out when you change page...

How would I go about to do this?? Anyone??

/Dexner

MULTIPLE SOUND (fade-in/fade-out)
Hi guys,

I have this problem. I would like to have background track playing on a flash-site. And when you click to load in en external page I would like another track to fade-in to "join" or "add" to the previously existing track with, lets say a little guitar flicks. And of course, fade-out when you change page...

How would I go about to do this?? Anyone??

/Dexner

Fade To Background On PNG
Hi,

I've copy and pasted an image from Fireworks into Flash. What I'd like to do within Flash now is apply somekind of linear 'falloff' on the fireworks image.

What I've got is basically a thick line, made in fireworks, and C&P'd this into my flash scene. The flash movie will appear on a textured background, so my flash movie will have it's WMODE parameter set to Transparent. Therefore how do I get my 'thick line' and fade this to also blend in with the backgroud of my webpage?

I've tried masking a linear gradient, but to be honest, I'm not sure I'm doing this right.

Any ideas?

TIA

Background Fade In/out
Hi folks, could somebody point me in the direction of a tutorial for a common background transition. Basically When you click on a button the current background fades out while the new one fades in.

I know this is quite a common feature on alot of websites but I have spent hours searching for a tutorial and its turned up null.

Alternatively if somebody could post the actionscript that would be great also.

Thanks!

Background Fade In/out
I have a movie clip loader and want to apply a fade in/out when i press a button. this is how i am tryign to get it to work:

when i am at the home page i want the splash image to fade in, when i press the contact page button i want the moviecliploader to fade out the current image and fade in the image that will be associated with the new page.

here is code that i have associatd with the home button:

Code:
home.onRelease = function(){
var mcl:MovieClipLoader = new MovieClipLoader();

var mclL:Object = new Object();

mclL.onLoadProgress = function(target,loaded,total) {
cload.percent.text = Math.round((loaded/total) * 100) + "%";
}

mclL.onLoadInit = function() {
cload._visible = false;
cload.percent.text = "";
}

mcl.addListener(mclL);

import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(bkg, "_alpha", Strong.easeIn, 100, 0, 24, false);
mcl.loadClip("splash2.png",bkg);


var styles: TextField.StyleSheet = new TextField.StyleSheet () ;
styles.load("theCSS.css") ;

theText.html = true;
theText.wordWrap = true;
theText.styleSheet = styles;

var lv:LoadVars = new LoadVars ();

lv.onData = function(contents) {
theText.text = contents;
}
the current snippet loads the new .png when i press the button however it fades out right away.

Image Fade Background
Ok, I have managed to make my title of my website fade between 3 images but once it gets to the last image it displays and ugly white background then starts again. I stopped this by using the "show" action but cannot d it for the last pic. help?

Having A Background Image Fade In
in my flash video i'm trying to have my backgfround image (it has its own layer) fade in from being totally transparent. shouldn't there be some way to accomplish this?
it is an image i imported
FILE -> IMPORT -> IMPORT TO STAGE

thanks.

Background Fade Using Actionscript
Hello there,

I have a quick question about fading a bg color using actionscript. I am creating a splash page at 800x600 in flash, which is being opened into a new window that fills the browser of the users screen. I already have the actionscript to open into a full browser window.

However, when the user clicks on a button in the 800x600 splash, the bg color in the full browser window will need to change from blue to white. What would be the best way to do this, is there a piece of actionscript that can be attached to a button to do this? Or does a large flash document size need to be created with the 800x600 centered in the middle?

If someone can please help, I'd reallly appreciate it...

Button Background Fade
If you look at this page:
http://motion-wave.com/

the background of the buttons in the menu is fading when you roll over/out. Can someone please help me out how you can actionscript that? Maybe you can show with some code example or a tutorial?

Thanks in advance

Fade Website Background
Hey all,

I have a flash website where I would like the entire browser window to fade to black when viewing various thumbnails. It seems that Flash's background color setting will bleed through the entire browser, but when I try to add a graphic to create the background fade it only goes so far as the flash stage.

The stage size is 780 pixels wide - do I need to create some sort of dynamic stage that scales to whatever the web browser size is? Otherwise, if the web browser goes bigger then 780 pixels the stage boundary is obvious.

In other words, am I able to control the padding between the stage and web browser if bigger than 780 pixels?

Thanks for any help!

Haus

Background Fade Using Actionscript
Hello there,

I have a quick question about fading a bg color using actionscript. I am creating a splash page at 800x600 in flash, which is being opened into a new window that fills the browser of the users screen. I already have the actionscript to open into a full browser window.

However, when the user clicks on a button in the 800x600 splash, the bg color in the full browser window will need to change from blue to white. What would be the best way to do this, is there a piece of actionscript that can be attached to a button to do this? Or does a large flash document size need to be created with the 800x600 centered in the middle?

If someone can please help, I'd reallly appreciate it...

How To Fade Background On Popup
How would I go about fading the background when button is pressed and popup is displayed.. I have many of these that load ontop of the main movie.

Here is an example on Nike site: http://nikemashup.com/

gives the feeling of depth on the site..

how is this done.. thanks

Load Pop-up Then Fade Background
can someone point me to a tutorial or help me on how to make a popup within flash and make the background fade.

an example can be found here http://www.dontlament.com but using flash to get this effect. click on TAKE A CLOSER LOOK at the bottom of each thumbnail and you will see what i mean.

cheers,

redrooster :D

How The Yahoo Do The Flash And Fade The Background?
hi.. anybody see yahoo's site. it has flash intro. it is pretty nice.. and it is a good idea to do like that.
it effect is support by java script. it is sure.
<HTML><SCRIPT LANGUAGE=javascript>var __w=closeBIG();if(__w!=null)document.write(__w);</SCRIPT></HTML>
i trying get the code .. but seemed not complete. anybody who master in this can help me the complete this research?
thanks for reading.

[CS3] Fade In Text Over Colored Background?
Hi,

This is probably a pretty simple thing to do but I've not been able to find anything in my googling that tells me how. I need several words to slowly fade in, one at a time until there are like 5 of them on the banner. The fontcolor has to be white. The background is a purple that fades from dark on the left to a lighter shade on the right. I was able to fade in black text over a white background by tweening the brightness from 100 to 0. But it doesn't work with this graduated colored background since the words are visible.

Could any one tell me how I could do this? I've never used Flash before so if you could dumb it down with keypresses I'd be grateful.

Change/Fade Background Image
I have 5 different buttons that I would each to change the background image, fading in the new one. Each button takes the user to a different 'section' of the website, and each 'section' has a different background picture. How can I make the picture change, fading in new one?
I just can't figure out the logic behind it - what would be the most efficient/easiest way to do this?

Chandler

Alpha Fade Background On A Navbar
Hello,
I have a navbar with a bunch of btn_mcs on top of it. I would like the navbar alpha to fade in when the total navbar is moused over. That alone is simple enough, the problem is when you mouse over the btn_mcs the focus shifts to the buttons and the alpha plays its' ROLL_OUT function (which is also needed for when you leave the nav area).

I'd like it to ONLY roll out when the mouse leaves the nav area, and not when the mouse goes onto another object.

Here's my code:
Code:

package {

   import flash.display.*;
   import flash.net.*;
   import flash.events.*;
   import flash.text.*;
   import fl.transitions.Tween;
   import fl.transitions.easing.*;
   import fl.transitions.TweenEvent;


   public class Sfgdc extends MovieClip {

      public var sfStat:Boolean = false;


      // create a new LocalConnection instance used to send
      // calls to a LocalConnection instance in another movie
      var outgoing_lc:LocalConnection = new LocalConnection();

      public function Sfgdc() {



         visitors.addEventListener(MouseEvent.ROLL_OVER, myOver);
         visitors.addEventListener(MouseEvent.ROLL_OUT, myOff);
         visitors.addEventListener(MouseEvent.CLICK, linkVisitors);
         visitors.buttonMode = true;

         online.addEventListener(MouseEvent.ROLL_OVER, myOver);
         online.addEventListener(MouseEvent.ROLL_OUT, myOff);
         online.addEventListener(MouseEvent.CLICK, linkOnline);
         online.buttonMode = true;

         help.addEventListener(MouseEvent.ROLL_OVER, myOver);
         help.addEventListener(MouseEvent.ROLL_OUT, myOff);
         help.addEventListener(MouseEvent.CLICK, linkHelp);
         help.buttonMode = true;

         textv.addEventListener(MouseEvent.ROLL_OVER, myOver);
         textv.addEventListener(MouseEvent.ROLL_OUT, myOff);
         textv.addEventListener(MouseEvent.CLICK, loadError);
         textv.buttonMode = true;

      }

      function myTrace(event:MouseEvent):void {
         trace("Home --> Click");
      }
      function myOver(event:MouseEvent):void {
         var myTween:Tween = new Tween(bg.cover_mc, "alpha", Strong.easeIn, 0, 1, .15, true);
      }
      function myOff(event:MouseEvent):void {
         var myTween:Tween = new Tween(bg.cover_mc, "alpha", Strong.easeIn, 1, 0, .15, true);
      }
      
      function linkVisitors(event:MouseEvent):void {
         trace("Home --> linkVisitors");
         outgoing_lc.send("Channel", "linkVisitors");
      }
      function linkOnline(event:MouseEvent):void {
         trace("Home --> linkOnline");
         outgoing_lc.send("Channel", "linkOnline");
      }
      function linkHelp(event:MouseEvent):void {
         trace("Home --> linkHelp");
         outgoing_lc.send("Channel", "linkHelp");
      }
      function linkTextv(event:MouseEvent):void {
         trace("Home --> linkText");
         outgoing_lc.send("Channel", "linkText");
      }
      function loadError(event:MouseEvent):void {
         trace("Home --> Error");
         outgoing_lc.send("Channel", "myError");
      }
   }
}


example swf:
http://sfdnb.com/Mitch.swf

this example has the roll listeners on the actuall buttons so when you go over them, they fade in the BG and when you roll off them they fade out the background. If you go from left to right it flickers.

Alpha Fade & Change Background Color
How do I alpha fade a background color (blue to red) from 0% to 100% using actionscripting?and vice versa

Would it be easy to attach on a movie clip and script, or do it only actionscript? Which is efficient?

Color Fade Into Background Image (using A Gradient), Who Knows How
I have an image of a house that I want the color blue to 'fade' into the house.
In photoshop, I would do this using the eraser tool, and just erase using the background eraser tool.
In flash mx, since the image of the house is a symbol, I cant exactly use the method of erasing,or can I
I would assume I would have to use the gradient tool and go from the blue color to the background color (which the background would be the image of the house )


How would I do this .
Post back if this is not clear.

Thanks

Document Background Fade (pixelwit.com Tutorial Help)
http://www.pixelwit.com/temp/colorfa...rial/home.html

I have my site set to fade between colors for multiple objects utilizing the scripting provided by the above site. Everything works perfectly, but I've run into a challenge. I am trying to get the document background (HTML, not Flash) to change colors evenly with a particular object in the Flash movie. I am trying to call a javascript function using GETURL each time the colorchange function changes the object's color, so that the fade is equal within the flash movie and on the document background.

I have modified the "transshift" function in the pixelwit code to do this, below is my code. The color change happens, but not gradually like the object's color does. The object fades colors, and at the end of the fade the document bg jolts to the new color. Any ideas?

Color.prototype.transShift = function(){
//trace("Running");
var ratio = (getTimer()-this.v.startTime)/this.v.milSecs;
if(ratio<1){
var newTrans = {};
for(var i in this.v.change){
newTrans[i] = this.v.startTrans[i]+ratio*this.v.change[i];
}
this.setTransform(newTrans);
color1=new Color(_root.rightfade);
taco=color1.getRGB().tostring(16);
trace("taco RGB="+taco);
_root.GetURL("javascript:changeBG("#" + taco + "")");



}else{
this.setTransform(this.v.goalTrans);
clearInterval(this.v.intrvl);
var myFunc = this.v.func;
delete(this.v);
if(myFunc)myFunc();
}
}

Changing Background Colour...making It Fade
hey there...i have made a file that changes the background colour when you roll over a button using the code

on (rollOver) {
bgcolor = new Color(_root.myBG);
bgcolor.setRGB(0x66FF00);
}

now i feel that the effect doesnt look right since the bg snaps instantly to that colour when i rollOver the button...i was wondering if it is possible to make the background fade from its original colour to the new colour

i have found a way to do this using tweens but i would perfer to use actionscript as i plan on having more complicated colour changes

Menu To Fade In/Out New Background Images And Text
I'm trying to create a navigation menu to fade background images in and out based upon what the user clicks.

So, for example, I have:

Contact
About
Portfolio

The stage when the user clicks contact has one background, and then when they click about, I want that background to fade out while the background fades in. My problem is, you don't know which order the ppt will choose to navigate the site so you can't hardcode the background that needs to fade out.

Can anyone point me to some code for this? Or a tutorial which may be helpful?

Thanks in advance.

Menu To Fade In/Out New Background Images And Text
I'm trying to create a navigation menu to fade background images in and out based upon what the user clicks.

So, for example, I have:

Contact
About
Portfolio

The stage when the user clicks contact has one background, and then when they click about, I want that background to fade out while the background fades in. My problem is, you don't know which order the ppt will choose to navigate the site so you can't hardcode the background that needs to fade out.

Can anyone point me to some code for this? Or a tutorial which may be helpful?

Thanks in advance.

Color Fade Into Background Image (using A Gradient), Who Knows How
I have an image of a house that I want the color blue to 'fade' into the house.
In photoshop, I would do this using the eraser tool, and just erase using the background eraser tool.
In flash mx, since the image of the house is a symbol, I cant exactly use the method of erasing,or can I
I would assume I would have to use the gradient tool and go from the blue color to the background color (which the background would be the image of the house )


How would I do this .
Post back if this is not clear.

Thanks

Color Fade Into Background Image (using A Gradient), Who Knows How
I have an image of a house that I want the color blue to 'fade' into the house.
In photoshop, I would do this using the eraser tool, and just erase using the background eraser tool.
In flash mx, since the image of the house is a symbol, I cant exactly use the method of erasing,or can I
I would assume I would have to use the gradient tool and go from the blue color to the background color (which the background would be the image of the house )


How would I do this .
Post back if this is not clear.

Thanks

[CS3] I Am Trying To Make The Background Fade Whilst Picking Out A Particular Area
I work for a small online furniture retailer and to add a bit of spice to our homepage we want to add a flash movie. This will be a an image with a few of our favourite products on it. What I want to happen is when a mouse over occurs over a particular product the background fades and that product is highlighted by a stroke and product details appear. I understand that I need to make separate movies for each product but I cannot seem to get the movie to load properly when a mouse over occurs. Please help!

Movie Sound And Background Sound Problem
I’m facing one problem. In my flash file have one background music and have one external movie ( flv ). I want when I click movie button then movie will load and background sound will stop and when I click close in movie then background sound will play again. *** remember movie file is external SWF file and I’ll put one button in that movie swf file call close.

And another one.. when movie running then if I click any other button then content come but movie sound play… this is not right .. caz when we click other button should be movie sound stop and background sound will playing

help me pls...

Sound Fade On An Attach.Sound
I have created a music file using the attach sound method on the root level within an MC and have launched it from another frame (_root.movieclip.gotoandplay(2)) and now I want to know how to fade it eventually.

Anyone know??

Fade In Fade Out Bg Sound
i ,

im trying to get a animation done where i have a bg music being played continously at 100%..the animation has few links
i want the bg music to fade out a bit when a link is clicked so that the event sound which i have inserted in the link animation be audible..
also as the link animation gets animated completely i want the bg music to come back at 100% again

....due to the bg music being played continously the events sound of link animaiton is not audible

help me get it right

any help would be appreciated a example would do a world of good for me to get the concept right

this site has what im actually looking out for
http://www.primecut.net

thanks a lot

babun

Fade In And Fade Out...Sound...?
how to fade in and fade out the sound through actionscript?

SOUND: Fade In & Fade Out
Hi every one
this my first post

the code below load external sound file "bg.mp3"
the sound will play automatically.

i have a a buuton that load FLV
i want to FADE OUT the sound "bg.mp3" if i loaded the flv.
and fade in if i close the FLV


ActionScript Code:
var musicURL:URLRequest = new URLRequest("bg.mp3");var sndMusic:Sound = new Sound(musicURL);var channel1:SoundChannel;channel1 = sndMusic.play();


Thanks for your help

Fade In Fade Out Bg Sound
i ,

im trying to get a animation done where i have a bg music being played continously at 100%..the animation has few links
i want the bg music to fade out a bit when a link is clicked so that the event sound which i have inserted in the link animation be audible..
also as the link animation gets animated completely i want the bg music to come back at 100% again

....due to the bg music being played continously the events sound of link animaiton is not audible

help me get it right

any help would be appreciated a example would do a world of good for me to get the concept right

this site has what im actually looking out for
http://www.primecut.net

thanks a lot

babun

Fade In And Fade Out...Sound...?
how to fade in and fade out the sound through actionscript?

Sound Fade Out
Hi
I have 5 music loops and 5 buttons,i want thet each sound
will fade out wen a nother sound is start playing.

and....that's all

thank's

Che

Sound Fade?
In keyframe 1 I have a sound looped 100 times.
In keyframe 2 I have a sound that lasts 10 seconds.

Both are the same volume.

Is there any way to get the sound playing from keyframe 1 to fade all the way down for the 10 seconds that the sound in keyframe 2 is playing??

Thanks for you time!

Sound Fade
No matter what I try or how I try it I cannot get .mp3 sounds to fade out. They just clip off with no fade at all. Does anyone have a suggestion ?

Thanks
Bern

Sound Won't Fade Out....please Help
I have an MC that contains the music. I pasted the following code to it

// fade out loop
onClipEvent(enterFrame){
if(startFadeOut){
if(containsMusic.getVolume() >= 0) {
containsMusic.setVolume(containsMusic.getVolume() - 5);
} else {
startFadeOut = false; //stop loop
}
}
}

Does this code go on a different MC just for the fadeout, or it's fine on the "containsMusic" MC?

I have the on/off buttons on another MC and to the "off" button I added the following code

on (release) {
_root.startFadeOut = true;
gotoAndPlay("soundOff");//this is where the "backON" btn is
}

does anybody see why this may not be working?

thanks in advance

Sound Won't Fade Out....please Help
I have an MC that contains the music. I pasted the following code to it

// fade out loop
onClipEvent(enterFrame){
if(startFadeOut){
if(containsMusic.getVolume() >= 0) {
containsMusic.setVolume(containsMusic.getVolume() - 5);
} else {
startFadeOut = false; //stop loop
}
}
}

Does this code go on a different MC just for the fadeout, or it's fine on the "containsMusic" MC?

I have the on/off buttons on another MC and to the "off" button I added the following code

on (release) {
_root.startFadeOut = true;
gotoAndPlay("soundOff");//this is where the "backON" btn is
}

does anybody see why this may not be working?

thanks in advance

Fade Down A Sound
Using Flash MX:

My main.swf file contains a BG music track, and I'm loading popups containing audio material into level 1. I want the BG ambience to fade down whenever a movie is loaded into level 1, and fade back up whenever level 1 is empty.

Ideally I want to control this from my main.swf (because I don't want to have to go back and edit the 50+ swfs that load into level 1)

Any ideas?

Sound Fade?
Does anyone know how to make a sound fade in when a user presses a play button and fade out when they press a stop button? I'm not very good at using the soundObject and am having some trouble figuring this out. Thanks for any help in advance.

Sound Fade In
i have a code for the fade in and fade out effect, but i dont know how to start the fade in effect?

I have the button code to start it , which is

on (press) {
fadeIn01 = 1;
sound1.start(0, 999);
}




But I want to start the fade in effect when my movie plays and it passes over a frame.

bottom line: How can I get the fade in effect to start when I come to the frame?

Sound Fade
How do you make a song fade in or out (i.e. change the volume).

Sound Fade
im trying to fade out a certain sound clip does anyone have any action script which would do this

cheers Sluap

Sound Off With Fade
but with a twist ....

I have a a pile of flv movies that may or may not be playing. When the user releases a specific button I want to fade out the sound of whatever flv happens to be playing. So, I am looking for a universal sound on off button.

Thanks,
sumsum

Fade In Sound > Fade Out Sound > Go To
Two parts...
Firstly, can someone clarify exactly how to fade in a sound? Bit dumb but that's exactly what I am in Flash. The only code I have so far is...

firstSound = new Sound();
firstSound.attachSound("Airport.mp3");

Secondly, is it possible to fade out sound on releasing a button, then, when the sound has completely faded out, go to where you've linked? I've seen this done in a Shockwave presentation but not just using Flash.

Thx

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