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




Control The Background Sound



I have an swf movie (Like a talking head). I am loading this movie on my main timeline. But I have a background music on this main timeline. I would like to make my main movie's music to fadeout while this talking head movie is on the main timeline. The moment the talking head movie comes to an end, I want the main music to play normally. Is this possible? I hope I am clear.
Thank you very much!



FlashKit > Flash Help > Flash MX
Posted on: 01-31-2003, 07:49 PM


View Complete Forum Thread with Replies

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

Sound Control With Pause Button As Well As Timeline Control
Hi there

I have a flash page, with a ambient track playing. I added a pause and play button. So you press the button then it stops, then you press it again then it plays...

So now i want to make it so that if you go to the 'WORK' page on the site, wich is on its own frame, and wich has different buttons linking to it, then i want the sound to switch off when i am on the work page as well.
So if the background ambient music plays, and you go to work then the sound switches off. Untill you switch it back on again
How is the best way for me to do that?

How To Control The Sound Volume On A Timeline Base Streaming Sound?
Hello everyone,

I have a MovieClip "Animation" with added sound as a Streaming. I have also created a Volume SiderBar which I would like to use to adjust the volume of the sound on my Flash.

The Volume SliderBar work fine and I need to some how assign the volume to the position (Value of) volume. I was wondering if someone can tell me how I can do this on a sound which is timeline based?

Thank you very much and have a great day,

Khoramdin

Sound Control Volume For Multiple Sound Objects?
I've got a file with several scenes.

Each scene has controls with different sound object defined on the first scene. There is a constant background sound object playing over all scenes. I need to control the volume of multiple sound objects playing simultaneously and setting each to different volumes from these scenes.

e.g
_root.bgmusic.setVolume(20);
_root.s001.setVolume(100);


can this be done? When I try, all sounds playing are set to the same volume.

Thanks heaps in Advance!

Sound Control Volume For Multiple Sound Objects?
I've got a file with several scenes.

Each scene has controls with different sound object defined on the first scene. There is a constant background sound object playing over all scenes. I need to control the volume of multiple sound objects playing simultaneously and setting each to different volumes from these scenes.

e.g
_root.bgmusic.setVolume(20);
_root.s001.setVolume(100);


can this be done? When I try, all sounds playing are set to the same volume.

Thanks heaps in Advance!

Sound Volume Control Using Streaming Sound In Timeline?
I am building a Flash 8 movie with animation that is synced to music in the timeline using streaming sound. At a few points I need the music to fade out and then play a video. When the video is done playing I need to come back into the timeline and have the music fade back up at the same point where it left off.

Is there a way to do this? turn down/up the volume of a streaming sound?

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...

Can You Control The Background Colour Of A Swf Externally?
I’m looking to make the background colour of my swf’s match the background colour of my site. Each area of my site has a different background colour and style sheets control them.

I can get JavaScript to read the body colour from any style sheet that is attached to a page. Is there any way of combining JavaScript to write into the flash parameters script so it will affect the movie?

I know that in IE5 I can make the movie have a transparent background but I want to make the movie viewable in Netscape and be backward compatible.

My JavaScript and Flash isn’t too hot so any help with this would be great!

:k

Control Html Background Images
Is there a way of changing the background image of the html page holding a swf movie from within the movie?

For example, I have a website developed fully in flash but would like the background image of the html page holding the site to change when the user moves from one area to another. Is this possible?

Alternatively I was thinking it may be possible to place a flash file which fits to 100% in the browser window and import another swf into this file which retains it's scale (in my case 600 x 800). I'm going to experiment with this second option but if there is a simple way of doing this which I do not know about could someone point me in the right direction? Cheers.

Buttons Control Background Sliding?
Okay, before anyone says it I have been searching for about half an hour and trying to find the/any tutorial for this but have come up empty handed.

Basically, what I want is a menu with buttons that, when clicked, scroll the background to a certain point which cotains the content. If you still don't understand check out www.hundredreasons.com (click 'anti-website' at the top) for an example.

Can anyone tell me, in layman's terms, how to do this. I'm a total n00b with actionscript so take it slow.

TIA
Paddy

Buttons Control Background Sliding?
Okay, before anyone says it I have been searching for about half an hour and trying to find the/any tutorial for this but have come up empty handed.

Basically, what I want is a menu with buttons that, when clicked, scroll the background to a certain point which cotains the content. If you still don't understand check out www.hundredreasons.com (click 'anti-website' at the top) for an example.

Can anyone tell me, in layman's terms, how to do this. I'm a total n00b with actionscript so take it slow.

TIA
Paddy

Volume Control For Looping Background Music
hope someone can help me... i am desperately trying to work out how to control the volume of my looping background music. i have only been been able to find volume controls which also have play, pause & stop.

if anyone knows how to create a horizontal volume slider could u please let me know?

thanking u!

Can Flash Control HTML Background Color?
Does anyone know if Flash can control the background color in the HTML page it sits in without the visitor refreshing the browser?

I'd like to allow the visitor to adjust the color scheme for my site, which will include the background color as well as the Flash elements.

Thanks!

Rollover A Button Control A Background Image
I am pretty new to AS3 and I am trying to create a site with a 3D background image (which I converted to a MC). I created 2 buttons that, when rolled over should move the background image ('bgMC') to pan either right or left (depending on if the user rolls over the right button or left). I've attached the code I'm using below, if anyone has a better code or knows how to use btnRt or btnLeft to make bgMC pan to the X,Y coordinates in 'goLeft' and 'goRight', I would greatly appreciate it. Thanks.


import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.geom.Point;

var goLeft:Point = new Point(602, 250);
var goRight:Point = new Point(202, 250);
var goCenter:Point = new Point (400, 250);

function rollLeft(e:MouseEvent) {
new Tween (e.target, 'x', null, e.target.x, goLeft.x, 1, true);
}

function rollRight(e:MouseEvent) {
new Tween (e.target, 'x', null, e.target.x, goRight.x, 1, true);
}

function rollCenter(e:MouseEvent) {
new Tween (e.target, 'x', null, e.target.x, goCenter.x, 1, true);
}

btnLeft.addEventListener (MouseEvent.ROLL_OUT, rollLeft);
bgMC.addEventListener (MouseEvent.ROLL_OVER, rollCenter);
btnRt.addEventListener (MouseEvent.ROLL_OVER, rollRight);

Can Flash Control The Background Color Of A Page With Php Or Javascript?
Can flash control the background color of a page with php or javascript?

I want a keyframe to change the background color of the html document.

Is that possible without going to a new html page?

Thanks ahead,
-Line

How To Volume Control Video Voice And Background Music
I would like to control the volume of a person speaking in a video and the volume of background music independently from each other with two volume bars.

However this far I can only:
1) Control volume on voice and music on same time (but not independently)
2) Control music but not voice

Here is the actionscript that controls the music. The voice actionscript is thought as being almost totally similar.

I am using Flash 8. Name of video (imported flv) is LD.

bgSound2 = new Sound(this);
bgSound2.attachSound("Guitar");
bgSound2.start(0, 99);
bgSound2.setVolume(0);
playB.enabled=false;
slider2.slideBar2._x = 20;
slider2.slideBar2.onEnterFrame = function() {
bgSound2.setVolume(0-(this._x));
};
slider2.slideBar2.onPress = function() {
startDrag(this, false, 280, this._y, 0, this._y);
};
slider2.slideBar2.onRelease = slider2.slideBar2.onReleaseOutside=function () {
stopDrag();
};
stopB.onRelease = function() {
bgSound2.stop();
playB.enabled=true;
stopB.enabled=false;
gotoAndStop("playB");
};
playB.onRelease = function() {
bgSound2.start(0, 99);
playB.enabled=false;
stopB.enabled=true;
};stop();

How Do I Control Volume For A Voice In A Video + Background Music
I would like to control the volume of a person speaking in a video and the volume of background music independently from each other with two volume bars. The problem seems to be controlling the voice from the video.

WHat I can do...but not really want to do:
1) Control volume on voice and music simultaneously (but not independently)
2) Control music but not voice

Here is the actionscript that controls the music. The voice actionscript is thought as being almost totally similar.

I am using Flash 8. Name of video (imported flv) is LD.

bgSound2 = new Sound(this);
bgSound2.attachSound("Guitar");
bgSound2.start(0, 99);
bgSound2.setVolume(0);
playB.enabled=false;
slider2.slideBar2._x = 20;
slider2.slideBar2.onEnterFrame = function() {
bgSound2.setVolume(0-(this._x));
};
slider2.slideBar2.onPress = function() {
startDrag(this, false, 280, this._y, 0, this._y);
};
slider2.slideBar2.onRelease = slider2.slideBar2.onReleaseOutside=function () {
stopDrag();
};
stopB.onRelease = function() {
bgSound2.stop();
playB.enabled=true;
stopB.enabled=false;
gotoAndStop("playB");
};
playB.onRelease = function() {
bgSound2.start(0, 99);
playB.enabled=false;
stopB.enabled=true;
};stop();

Thanks
Jens

How To Control Flash Stage Background Color Using External Text File
Hi Friends,

I have 2 problems while using external text file.

1) How to control Flash stage Background color using External .txt File, I want to change the color of the movie background through an external .txt file.

2) And how to load jpeg image in a flash file through an external .txt file.

Waiting for your replies
Thanks all
Tummalap

Background Sound
Hello everyone
I am having a problem with a background sound. I should start by telling you that I am using MX.
I have a Flash presentation that will be distributed on CD as a projector exe. In side the presentation you can launch programs created in Director 8.5 which contain panoramas, my problem is when you launch one of these Director files it takes about 10 seconds for the program to open, during this span of time the background sound in the flash projector gets broken up and skips. I am assuming this is because it is taxing the processor, I am running a
933mhz Pentium 3 and I think it should be able to handle both tasks. It should also be known that my panoramas are using an asset for panoramas created in Realviz Stitcher. Stitcher formats the panoramas in a shockwave file. I’m not sure if this has any bearing on the problem.
Any ideas would be greatly appreciated. I would open to any ideas, maybe something along the lines of script attached to the button that opens the panoramas to temporally pause the sound for 15 seconds or so.

Thanks Rex

Background Sound
hi,
i have a flash file in which it is all based on frame based navigation. what i wanted was to playa looping sound in the background throughout the movie continuously and a button to play/stop. how can this be done?

Background Sound Help
Hi,

When I have my background sound play along with flash music play at the same time, when I mute the background sound it also mute the flash music player.
How can I mute only background sound without muting my external flash player?

Thanks

Help With Background Sound :((
Hi!
I have been working at a website and I have to use a background sound. The problem is that if I go to some other frames, the sound keeps starting again and again and it's very annoying..

Is there a way to prevent the sound from starting if it is already playing?

I mean there definetly is a way, but it is very strange because I'm not calling that sound to play again in any other frame.

Background Sound
Hi all:

I have background music playing on my movie. I also have two seperate tracks that a user would have to press a play button to hear. What I'm looking for is for the background music to stop when they press the play button for the track and to resume once the track ends.

I've tried the stopallsounds code and a couple of others, that I've researched but have had no success. Any help would be greatly appreciated.

Background Sound
ive a background sound thats called to play when my application starts and it plays along nicely ect ect... the problem i have is when i click on a button to say another scene and the link back from that child reverts to the start of the parent, the background sound plays again resulting in multiple background samples playing at the same time?? is there any code trickery that will alow the sound to play only once no matter how many times that initial frame is visited??

John

Background Sound?
Hey everyone,

I have a really complex animation setup with like 6 scenes and in each scene the frame action is in sections (for example, there will be a scene..then nothing..then a scene..then nothing) ...the individual sections run into 'gotoandplay' commands or others which lead to other sections here and there.

Anyways, that's not the point. The thing is, I tried putting sound behind all these sections in all these scenes but it's ridiculous because some of the sections repeat themselves or you're jumping to new sections all the time so you're constantly hearing the sound get 'cut-off' and 'repeated' and it sounds horrible.

My question is, is there a way i can just somehow put a background sound in that plays THRU everything? no matter who clicks on what or what goes where? so in essence, i would have a sound that was ONE clip..playing through it's entirety and repeating but not being effected by all the actionscripting going on with the user...

See what i'm saying?

how do i do this if this is possible?

Background Sound
Hello everyone,

Im just trying too add some background sound FX to my movie. I also want it too loop. Im using the following script but it seems too not work.

backSound = new Sound ();
backSound.attachSound (audio.mp3);
backSound.Start(0,99);

Anyhelp would be greatly appreciated.

Background Sound
Hello,
I have a background sound bite that I would only like it to play the first time the page loads, not each time. How do I set that feature.

Also, is it possible to also have the flash animate the first load also? After that, each page the consumer loads will from that point be a solid image?

Thanks Dom

Background Sound...
Is there anyway that I can import a mp3 file and preview the sounds it makes without having to "Preview" it. I want to be able to mix the music a little bit. Thanks.

Background Sound...
Is there anyway that I can import a mp3 file and preview the sounds it makes without having to "Preview" it. I want to be able to mix the music a little bit. Thanks.

Sound In Background?
Hi everyone!!

All i want to know is simple, but might be complicated i dont know!

How do i get a sound to play throughout the entire flash site in the background?

Go to www.cruciallimit.com and you will see what i mean.
Its a great site by the way!

In this "crucial limit" site, he has tunes playing in the background, and they keep playing despite how deep you navigate throught the site, no matter what button you press, the song continues to play without stopping.
Thats what i want to achieve.

Can anyone help me????

http://www.cruciallimit.com/

Sound In Background
Hi everyone!!

All i want to know is simple, but might be complicated i dont know!

How do i get a sound to play throughout the entire flash site in the background?

Go to www.cruciallimit.com and you will see what i mean.
Its a great site by the way!

In this "crucial limit" site, he has tunes playing in the background, and they keep playing despite how deep you navigate throught the site, no matter what button you press, the song continues to play without stopping.
Thats what i want to achieve.

Can anyone help me????

http://www.cruciallimit.com/

Background Sound Help
Hello all.. this task is really confusing !!

i have a sound clip that occupies 50 frames.
i need to run it endlessly after its completion without break.

in flash 8 i tried the option , sync event loop.. so that its playon contiguously..

it is playing continously.. but

when the sound clip ends it leaves a 2 second gap and then begins to play..

I want to remove the 2 second gap , but i was unable to do that !

i tried all means , but not helping..

Background Sound
I suppose this is an easy one:

I have a layer (layer1) with an animation that loops (frame 10 -> frame5), and another layer (layer2) that has a keyframe on 5 where a sound file starts to play. Now, the sound file loops together with the animation, but I want it to continue playing without looping. How can I do that? I want to add more layers that aren't looping...

Thanks!
Pieter

Background Sound In One Frame Alone?
I have a three-frame game, and I wan't music in the
second frame alone. How do I do this? Everything I
try it keeps playing through to the third, and
if the user "plays again" the background music
plays twice over itself.

stopAllSound worked in the third frame, but it killed
my "game over" sound.

THNX

Streaming Background Sound
i feel very dumb - actually i forgot how to make tiny movieclip with a long streaming sound inside - i tried around but it always loads completly before playing - how can i make such a movieclip so it plays in the background? (flash 5 compatibility would be great as well)

any help?

Different Background Sound Options
Hello Flashers,

I was wondering if it was possible to give the end user an option to choose from 4 different background sounds?

I believe I want to have 4 buttons for this, but all in one movie if that is the best way to do it? I am not yet familiar with sounds yet using actionscript as I am still new to all this.

I want to have the 4 separate buttons (one for each sound .wav and have each one loop continuously) and an "on" and "off" button in the same main movie if that makes sense? I can pull the on and off buttons from the flash mx library and I will make up 4 buttons for the sounds, I just need the code if possible to put all this together if anyone can help me?

I thank you all very much

Thorrax

How To Make Background Sound ?
Hi, I'm new on Flash.
Please anyone, how to make background sound in Flash ?
I mean a whole song (like when we're listening to MP3) not 2' or 3' loops. Something like jukebox perhaps....
Thanks anyone who helps me

Continuous Sound In Background
I'm looking to have an audio clip play over and over, even after the motion in the rest of my movie is done.
I was thinking of creating a separate swf and importing into the libary and some how calling it to keep looping.
Any suggestions?

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

Background Sound Loops
Hi,

my sites use a swf that contains 1 mp3. Lets call it bgsound1.swf.
The viewer can skip songs by clicking a button, the button will load a new swf. Lets call that bgsound2.swf

But I want the bgsound1.swf to automatically go to bgsound2.swf as soon as the mp3 has finished (now it just continuesly keeps looping if the mp3 is finished). How do I tell my movie that he must load the second movie. How does the swf knows when the mp3 is finished? I havent got a clue.

who can help me there?

Worrisome Background Sound..PLEASE HELP
HEllo everyone...Well am a newbie to this forum...and am in need of some desperate help....let me lay it out for you.....i have made a flash MX 2004 presentation (swf) with a lot of scenes and a voice over in each scene. It also opens full screen. It was all good till my client asked me to put a background song. Now heres my problem....As i have the voice over in each scene....at the end of each scene i have put "stop all sounds" .if i remove this the voice over continues on to the next scene.....so now i need to put this BG sound without changing anything else....I have read a previous thread and have come across sumthin like this

"A2: attach a movie clip to the stage in scene 1 using attachMovie and it will not be affected by scene changes. Include the sound in the mc or associate a sound object with this mc."

This could be the slution but i have to idea what it means....can some one elaborate...
Also to find a solution i tried using director MX...i imported the whole swfinto my stage and put the sound clip ....it works fine but while making a standalone out of it.....my stage goes full screen but the imported flash swf remains 800 x 600...is there anyway i can make that stretch to full screen too...If I have the answer to this then i can make it happen in director ....

Well here I am desperately awaiting some solution....Thnks in advance everyone......have a good one till then.....Ciao.

Background Sound With On/Off Buttons
i want to create a background sound in my project,
and it includes On and Off buttons..

when the flash file is open, the bg sound will play
if the user wants to stop or pause the sound,
the button Off will be press and i used this code

ActionScript Code:
this.sound.ffo.onRelease = function()
{
    stopAllSounds();
}
is that right?

but when the user click the "On" button, the sound will play where the sound stop and continue playing. did you get it? i can't explain clearly sorry for that..
how can i make that?

Load Sound In Background
Hi,

I have this Flash web template with 1 main swf and 5 external swf's, and there is a sound loop in the main swf. How can I load the sound loop in the background, while being able to navigate (load) the 5 pages? A good tutorial maybe? Or some source file to start from?

Hopefully my question won't stay unanswered as the one from link below did.

http://www.actionscript.org/forums/s...d.php3?t=54751

Thanks.

Looping Background Sound
Hi all,

I wonder if anyone can help me. i am new to flash and actionscript and i am working on an online portfolio site. I am trying to add a background music loop but have read (for about 2 hours) of all sorts of ways to do this - but I cannot get any of them to work - could anyone tell me the best way to do this?

Thanks

Steve

Actionscript For Background Sound
ok i have a website i am building in it i have 5 menus.
i want to have the background music to play, but when the intro menu is active i want the background music to stop playing for the intro menu i loaded the intro movie clip an it has its own background music. but when i leave the intro menu i want to restart the background music.

how can i go about this?
for both background music in main movie an loaded movie intro.swf have the same background music names.
is it just a matter of renaming one of the movies music names?

Background Sound Won't Play
Hi all --

Looking to attach a background sound and play it using ActionScript. However, it's not working. I'm trying to link it up to a button called "soundButton" that toggles the audio. I have the wav file in my library, have exported it for ActionScript, and given it a linkage ID of "music."

Also, if I trace after a button click, my "soundPlaying" value is always "false." Any ideas?

See attached code below...any help is greatly appreciated!







Attach Code

var soundPlaying:Boolean = true;

var my_sound:Sound = new Sound();
bg_sound.attachSound("music");
bg_sound.start();

soundButton.onRelease = function() {
if(soundPlaying=false){
trace(soundPlaying);
var numSecondsOffset:Number = (bg_sound.position/1000);
bg_sound.start(numSecondsOffset);
soundButton.gotoAndPlay("on");
soundPlaying=true;
}else{
trace(soundPlaying);
stopAllSounds();
soundButton.gotoAndPlay("off");
soundPlaying=false;
}
}

























Edited: 11/15/2007 at 11:01:00 AM by ndisdabest

FMX Background Sound Question
Please, I am a complete Flash AS newbie and have a little problem with a site I am building for a friend.

I am using Flash MX and have built a movie which includes a Flash component by Israel Cazares - 'Audio set component'. It is a nice simple mp3 player. I can manage to get this working OK.

Now my friend would like some backgroung music loop to play when the site loads and stops when the audio component's play button is pressed.

I have read Kenny Bellew's tutorial about working with sound objects and can define a sound object and get it to start playing (I think) but I don't know how to stop it when someone starts to play a mp3 using the audio component.

A little help would be greatly apreciated. Is this a relatively simple thing to do? As I said I'm not that knowledgeable about AS

K

FMX Background Sound Question
Please, I am a complete Flash AS newbie and have a little problem with a site I am building for a friend.

I am using Flash MX and have built a movie which includes a Flash component by Israel Cazares - 'Audio set component'. It is a nice simple mp3 player. I can manage to get this working OK.

Now my friend would like some backgroung music loop to play when the site loads and stops when the audio component's play button is pressed.

I have read Kenny Bellew's tutorial about working with sound objects and can define a sound object and get it to start playing (I think) but I don't know how to stop it when someone starts to play a mp3 using the audio component.

A little help would be greatly apreciated. Is this a relatively simple thing to do? As I said I'm not that knowledgeable about AS

K

Background Sound Problem
hi all,

I'm having a flash instruction movie step-by-step showing user how to do something, and every step I included a STOP() code along with buttons to move forward to the next step or backward to the previous step... and so on!

Now, I want to include background sound to explain whatever happen in every step, and I had that done as well!

EXCEPT...  the sounds, which are typically longer than the clips they embedded, they keep going on when I skipped to the next steps...

Is there a way to eliminate or stop or confine each sound for each step, and when I go to the next step before the sound ends, the new sound will takes over instead of having both of the sound clips talking over each other.

thanks!

How Do You Stop Your Background Sound?
Through out my projector, from the intro up to the menu select screen I have a mp3 playing. When my user chooses his/her selection I want the sound to stop. I am aware that I have to use the

soundObj.stop("soundID")

script but i'm not sure how to use it? where do I attach that script? and do I need to replace soundID with the name mp3 being played?

help apprecated!

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