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




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.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 04-19-2006, 11:26 PM


View Complete Forum Thread with Replies

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

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

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

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!

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!

Background Sound Decrease Temporarily
Hi

I have a piece of background music playing.

When the user clicks on a button,another sound is played. Is it possbile to lower the volume of the background sound temporarily while the other sound is playing, then when finished, resume the background sound?

I guess the psuedo code would be something like this:-

On release()
Background sound==(20)
Play (new sound)
When (newsound) finish
Background sound (back to normal)

If anybody can help me I would be most grateful!

Thanks

Question About Background Music/sound
hi everyone!

is it possible to have streaming audio (like music/song) play in the background while you move from one scene to the other? or can it only be during a certain specific scene?

let me know if you can!
thank you for your time

Load And Unload Background Sound
I have my bkgd music in a movieclip-I also created a button on the main movie to mute and unmute the sound, how do I get this to work?

I tried a script (stopallsounds)it works for a few seconds then the music starts up again??????

Muting Background Sound With SetVolume
I have a little problem. I'm trying to use the unfashionable way of muting the background music/sound using the setVolume method.

I have two buttons. One is the mute button, the other is the unmute button. The mute button simply says:

onClipEvent(mouseDown){
_root.volume.setVolume(0);
}

While he unmute button says:

onClipEvent(mouseDown){
_root.volume.setVolume(100);
}

Quite simple. Should work, right? Well for some odd reason it doesn't. The mute button does it's job just fine. But the unmute button won't. I have no idea what could be wrong.
For debugging purposes, I have a dynamic text-field with the value of the current volume level displaying in it. When I hit the mute button the text-field displays 100. This is not correct! The volume level should be at zero!

I originally used this code on one mute button, but split it up into two buttons because it wasn't working:

// when the user presses the mute button
onClipEvent(mouseDown)
{
s = new Sound();
if (s.getVolume != 0) // if volume not muted already ...
{
s.setVolume(0); // ... mute it
} else {
s.setVolume(100); // ... if it was muted, then unmute it.
}
}


I really need some help! Its 12:16 AM here, and I'm exhausted. I'd like to see if I can get this fixed.

Background Sound Loop In Flash MX
I have created a movie which includes a MP3 player component that works fine.

However, now the person for whom I built the site, wants to include a background loop that plays when the movie opens.

I can put the background loop into the movie, but my problem is; how do I stop the loop playing when the user clicks the "play" button on the MP3 component?

I know I can use a sound on/off button that the user can click prior to using the MP3 player, but this is not really what we want.

I'm not the most experienced flash user, hence the use of an existing component for the mp3 player.

I hope there is a simple solution to this problem.

K

Sound :: Midi File In The Background
i am making a video game and want to play the sound i have as a midi file in the background, but i can't get it to play. I've tried importing it to the library as well as the object.loadSound(); code. neither of these seem to work. is it at all possible to play a midi in flash or do i have to convert it to mp3?

if i have to convert it does anyone know how?

Making A Background Sound Loop?
ive just completed my new game and wanted to add some background music to it, how would i go about adding a music loop to a few frames and make it keep playing over and over...

thanks in advance,
ben

Problems Loading Background Sound
has anyone had problems importing an swf to their movie but the background sound never worked?

any suggestions?

Background Sound With SharedObject Class
Hi, i´m trying to put the same sound loop on various html pages. I can´t use frames for it, so i´m trying to use the shareobject class for a continuos play. My not working code for now is :

loop1 = new Sound( MC1 );
loop1.attachSound( "theme" );
this.onEnterFrame = function () {
_root.songDurationText=_root.loop1.duration/1000;
_root.songPositionText=_root.loop1.position/1000;

songDuration = _root.loop1.duration / 1000;
songPosition = _root.loop1.position / 1000;
}
var local_data = SharedObject.getLocal( "sound_position" );
local_data.data.sound_position = _root.loop1.position / 1000
trace( "root sound_position: " + local_data.data.sound_position );
if (stored_sound_position = local_data.data.sound_position) {
playing=true;
loop1.start();}
else loop1.gotoAndPlay (1)

--- New code on fla but not working yet

Help needed.

Background Sound On And Off When Video Playing?
does anybody know how to stop background sound when clicking play button for a video and when the video is finish how to turn background sound again on?

Newbie Question About Background Sound
I've got a flash template that I've been working with which includes a background sound file that loops through out. I can't figure out where the sound file is being loaded - can anyone give me a general idea of where to begin to look?

Flash Background Sound Loops
I've been attempting to use flash to create a simple .swf that serves as a background sound loop for a web page. The problem is that when I set the sound file to loop, an annoying skip is heard as the sound repeats. This occurs for mp3 and wav loop files and doesn't seem to be a problem that is flash-only (Frontpage wants to do the same thing with background loops). I've tried different sound card drivers and I've tried editing the sound files themselves to align the start and finish. I'm out of ideas. Any suggestions?

How To I Use Sound In FlashMX And How To Change Background Color?
If I have a total frame of 90. At the 7th frame, I want to put sound starting from the 7th frame to 90th frame. How to do it?

If I have a background color of black, how to change the color from 7th frame onwards to 90th frame if I want the 1st to 6th frame color remains as black?

How To Ogranise My Files So That The Background Sound Can Be Streamed
I have more then 2 swf. First part is an intro, then the other is a main page.

I want a background to play continuosly when intro goes to main page.

I tried combine both.... but the file become too big and then the movie lags...

Is there any other ways to achieve this?

This flash project is not web based... its to burn into a CD for more infomation.

Flah Movie Button And Background Sound On Off
I have a problem with sound, I have one background sound and some other sounds are running on button rollover in a flash move i want turn off and on all sounds with a single button

please help

sajith

How Do I Remove The Background From A Movie / Sound Problems
Apologies, not really sure what I’m doing…

How do I remove the background from a movie I made?

I imported a QT movie at 368/272 pixels, but for whatever reason the HTML jumps up to 550/400.

The movie is still 368/272 but there is a background border making it 550/400. Tried all sorts of settings in Publish but can’t get rid of it. Can I keep the movie (and controller) and not the background?

I can get round it by changing the background colour, but surely there must be another way.


Also: My QT file was fine but the .flv has a stuttering sound, any idea what could cause that?


Thanks, and Thanks!

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