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




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



FlashKit > Flash Help > Flash ActionScript
Posted on: 06-26-2002, 04:23 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...

Looping Sound In Frame Then Move To Next Frame
hello all,

I come to the swf lords for help.

Please look at the following code that I'm trying to use in flash player 9 when trying to use Actionscript 3.0

First let me tell you my objective: I'm trying to play a sound to continually loopwhile in frame 2 plays. When frame 2 finishes playing out I use gotoAndStop(3) and I want the frames 2 sound to stop playing so I can start frame 3 sound.

Now this is what really happens: In some attached code the sound frame 2 will carry over to frame 3 and not stop. Other code, the frame 3 will be called even before frame 2 starts playing.

************************************************** ************************************************** ****************************
stop();


/*
import flash.media.Sound;
var trans:SoundTransform;
var mySndCh:SoundChannel;
var mySnd:Sound = new Sound(new URLRequest("sound/mymusic.mp3"));

function playMusic():void
{
mySnd = new NameOfSound();
mySndCh = mySnd.play();
mySndCh.addEventListener(Event.SOUND_COMPLETE, loopMusic);
}

function loopMusic(e:Event):void
{
if (mySndCh != null)
{
mySndCh.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
playMusic();
}
else
{
gotoAndStop(3);
}
}
*/
-------------------------------------------------------------------------------------------
/*
import flash.media.Sound;
var trans:SoundTransform;

trans = new SoundTransform(1, 0);
var snd:Sound = new Sound(new URLRequest("sound/mymusic.mp3"));

var i:int;
for (i = 0; i < 1; i++)
{
snd.play()
}
*/

--------------------------------------------------------------------------------
/*
import flash.media.Sound;
var trans:SoundTransform;

trans = new SoundTransform(1, 0);
var snd:Sound = new Sound(new URLRequest("sound/mymusic.mp3"));

var i:int;
for (i = 0; i < 2
{
if(i++)
{
snd.play(0, 2);
}
}


*/


************************************************** ************************************************** *****************************

Please let me know what I'm doing wrong

Thank you for your time,

-lexeo602

Tying Sound To Frames - Frame-by-frame?
If you feel you know what you are doing in Flash and need help, ask it here.

Frame Background Colors
I have had flash for sometime but since I don't use it alot I am still a newbie at it in all reality...

IS there anyway to have each frame have a different background color?


Thanks in advance.

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 Transparent) Text In A Frame?
I'm wondering if it's possible to create a frame within a flash movie that will load text with a transparent background?

I know how to create a dynamic text scroll that pulls data from just a plain .txt file, however it looks really awkward with the site I'm working on, b/c the background of the text box is white, while the rest of the site is a graphic. It looks cheap.

What I'm trying to do is create a "NEWS" section on a site. Of course it will be updated frequently so I don't want to hassle with having to open the flash, editing the text, and then reuploading the .swf file to the server each time. I'd like to just be able to edit it from the web.


Any suggestions?

How To Leave Last Frame Of Movie As Background
I have a small flash intro movie that plays fine. But when it finishes playing the screen is blank. I'd like the last frame of the movie to stay on the screen indefinately, without looping the whole movie again.

How can I do this?

BTW: I am using CS4 Flash

Random Frame: To Display Background
I have a movie clip placed on the first frame within the main timeline.

- The movie clip contains 4 frames, each frame has a different image.
- I want to display one of these frames at random every time the game loads.

- What script would i need to target a random frame within this movieclip?
- Would this script be placed on the main timeline?

Any help, much appreciated
Cheers
Peter.D
chockybickyman@hotmail.com

Random Frame: To Display Background
I have a movie clip placed on the first frame within the main timeline.

- The movie clip contains 4 frames, each frame has a different image.
- I want to display one of these frames at random every time the game loads.

- What script would i need to target a random frame within this movieclip?
- Would this script be placed on the main timeline?

Any help, much appreciated
Cheers
Peter.D
chockybickyman@hotmail.com

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!

Frame Printed Takes Background Color
Hi everyone

My main movie has a blue background

it's calling another movie where I print a frame.

the print resulted has a blue background

How can I avoid having any background color on my print?

Background: Movie Clip To Static Frame?
Hi all, i've attached a file to help in trying to explain what I mean.
Its probably a really stupid question, but hey ho.

Basically im making a site where the background of the whole site remains the same. However, the background is animated in to begin with, then remains stationary from that point on.
The attached file shows how the background will kinda be (it is just for an example), it starts as a small square then animates from there.
The last frame of the attached file is how the background will remain from that point on, throughout the whole site.
I have done the animation part as a movie clip, How do I put that movie clip onto frame 1 of the scene, then on frame 2 put a frame exactly the same as the last frame of the movie clip? so that it plays the entire animation, and then goes to frame 2?
At the moment he way I do it, means it plays like the first frame of
the animation and then goes to frame 2 - so it jumps immediately from
a small square to the full screen background i.e none of my animation
is shown.
Im using Flash 5.0 by the way.
lol I hope I have just made sense - in my defence it is late!

[MX04] Background Color & Frame Rate
hi,

just wondering if there's a way that I could retrieve the frame rate and background color of an external swf file that i'm loading in.

the main swf file (the one that loads stuff in) will be loading in various swf files out of my control so it's not an option to create a solid background in the external swf files

thanks

[CS3] Stopping Background Music When Going To Another Frame (another Page).
I'm trying to get a sound to stop playing when I click on a button (my home button) that brings me to another frame (the home page). I have very little action scripting (3.0) on here. Just some frame labels and stop actions on their own layers. Basically, i have a page (my bio
page) with some motion tweens and a home button that fades in. I already have it set up so that when you click on the home button, it goes to the home page. However, the background music does not stop and it continues to play, overlapping the different home page background music. The background music is on it's own layer. Ive been through about 5 different tutorials so far and they have all failed miserably.

i tried adding a "stop all sound" script to the same script that says when i click on the home button, to bring me back to the home page....so the sound only stops when i click on the icon. however, it stops all sounds everywhere and the home page background music does not play anymore.

So my question is...do you have any ideas on how to make the background music stop when a button is clicked, so that when you jump to another frame on the timeline (new page), the music won't continue playing and will allow the other background music to play?


thanks for any help. this is an art final due friday and its been driving me nuts all day.

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

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