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!
Ultrashock Forums > Flash > Flash Professional
Posted on: 2005-01-14
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Attach Sound, Play Sound & Stop Sound.
Hey there,
I was wondering if any of you could help me please.
I want to play a song which I have named "rundmc" The file extension is ".mp3"
I want a button to play this mp3 which I read you need to attach that sound, then play it and I want to a button to stop that sound, or preferably the play button to change into a stop button.
I've read the help files, but none of it works and I've changed the linkage for the mp3 to export for action script, but nothing works!!!
Please help,
NK.
.stop() For Sound Object Stopping Embedded Video Sound
I have a problem where the stop funtion for a sound object is stopping the audio in an embedded video. Has anyone ever encountered this? Ihave poured over my code and there is no cross-linked intance names, so I do not have a clue what is happening.
Stop Sound File Early (using Sound Object)
I know I can use the play() method of the Sound object to offset the beginning of a sound. Ex:
mySound.play(2000) - plays the sound beginning at 2 seconds
Is there a way to get a sound to stop early? For example, if it is a 20-second sound, can I get it to stop at 18 seconds? Thanks!
On Press Play Sound On Release Stop Sound
I have a button that is inside a movie clip 'forward'.
When you press the button it plays another movie clip 'time' forwards
on (press) {
forward = "1";
}
on (release, rollOut, dragOut) {
forward = "0";
}
on the button and:
if (forward eq "1") {
tellTarget ("/time") {
nextFrame();
}
}
on the first frame of the 'forward' movie
I would like sound to happen when you press the button and stop when you realease the button
but I not sure how any help would be gratefully excepted
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...
How To Stop MC At Same Time As Sound Stop?
Hi and thanx for u trieing to help me.
I have used this code to play a sound from the library.
with (song_link) {
sound1 = new Sound(song_link);
sound1.attachSound("inga");
sound1.setVolume(100);
sound1.start(0, 0);
}
and when the sound stops i would like to stop a MC that loops.
if there is any way to have an if command in the MC that waits for a variable to be sended and then stops.
or to set some kind of countdown when u start to play the sound that tells the MC to stop.
i would be very glad if u could help me!
Stop Movie - Don't Stop Sound
Hello,
I'm making a intro for somebody's site. The intro plays a loop. At the last frame I made a stop script. But I want to the muis (a loop) to play on and on. So the music won't stop when the movie stops.
Can somebody help me?
Tnx & greetz, Big_Boss_Man
If I Stop The Sound I Want To Play It From Where Is Stop :)
hi all
i want a button if i cilck on it the sound will stop and another button if i click on it the sound will continue from where it is stoped is it possible in flash or not
and the sound where is the best place i place it ( movie clip - main frame - action ????
thanks
if any one can give me an open file to be clear or the code
Stop The Scroll Of The Background
I have a scrolling map that starts scrolling when my hero gets near the edge of the screen and then the code scrolls the map in the same direction - problem is it stops scrolling when you get off the key but if u turn around and start to head off the other way it stills scrolls for a second until you get out of the 'hit' area.
this is some of the code:
onClipEvent (load) {
planespeed = 12;
speed = 8;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
if (_x<525) {
_x = _x+planespeed;
} else {
_root.thingscroll._x = _root.thingscroll._x-speed;
}
}
if (Key.isDown(Key.LEFT)) {
if (_x>125) {
_x = _x-planespeed;
} else {
_root.thingscroll._x = _root.thingscroll._x+speed;
}
}
if (Key.isDown(Key.UP)) {
if (_y>100) {
_y = _y-planespeed;
} else {
_root.thingscroll._y = _root.thingscroll._y+speed;
}
}
if (Key.isDown(Key.DOWN)) {
if (_y<450) {
_y = _y+planespeed;
} else {
_root.thingscroll._y = _root.thingscroll._y-speed;
}
}
}
onClipEvent(enterFrame){
//detect the key and set variable "direct"
if (Key.isDown(Key.RIGHT)) {
_root.direct = "right";
}
if (Key.isDown(Key.LEFT)) {
_root.direct = "left";
}
if (Key.isDown(Key.UP)) {
_root.direct = "up";
}
if (Key.isDown(Key.DOWN)) {
_root.direct = "down";
}
//rotate according to direct
if (_root.direct == "right" and _rotation != 90){
_rotation = 90;
}
else if (_root.direct == "left" and _rotation != -90){
_rotation = -90;
}
else if (_root.direct == "up" and _rotation != 0){
_rotation = 0;
}
else if (_root.direct == "down" and _rotation != 180){
_rotation = 180;
}
}
Any help appreciated...
Rollover W/sound , Stop Sound On Rollout
HI,
I've got rollovers w/sound, that are close to each other. When i roll over them, they ALL play...How do I stop sound on rollout WITHOUT stopping my Background sounds?
Help Appreciated, Thx
Rollover Sound On - Rolver Sound Stop
I am new to Flash but would like a little more control over a button sound than I currently understand. I would like a sound to play on rollover of a button but as soon as the mouse is outside that button, I would like the sound to stop. Is there an easy way to achieve this?
Thanks
Sound.getbytesload And Sound.stop() MXPRO2004
I've figured out a workaround for this, but was just posting to see if anyone has a better way to do this.
What I want to create is a streaming player that shows a bar of how much of the sound is loaded and an indicator on the bar of where the sound is currently at while playing. I would also like the sound to start loading as soon as the movie is loaded, but not start playing until the user presses the play button.
The problem I run into is if I stop the sound, the loading of the sound stops too. So, the only way to have the sound load is to also play it. The workaround I'm using is as follows:
When the sound first starts loading, I set the soundvolume to 0. If the user presses the play button, I begin playing the sound from the beginning. If the user presses the pause button, I record the duration of the sound into a variable, but instead of using mySound.stop(), I turn the volume to 0 and let the sound continue to play. If the user then unpauses the sound I start play from the duration number where it was last paused.
I'd like to be able to use sound.stop() on this, but I don't think it's going to work. Any ideas?
HELP Sound Object Stop Kills Flv Sound Too
code:
if (!firstTime) {
_root.introMusic = new Sound();
_root.introMusic.attachSound("music");
_root.introMusic.setVolume(50);
_root.introMusic.start(0, 1);
firstTime = true;
}
music_btn.onRelease = function() {
if (!rockNow) {
_root.introMusic.setVolume(0);
this.gotoAndStop(2);
rockNow = true;
} else {
_root.introMusic.setVolume(50);
this.gotoAndStop(1);
rockNow = false;
}
};
stop();
This script for my "music on/off" btn kills ALL audio and not just the sounds object audio. It also pauses FLV playback (I'm using the FLVplayback component). Any insite?
I've tried modifying the above AS not using the "_root." to target the obj and also stop() and start() on the obj instead of just volume control. HELP!!!
Thanks,
1M.
Play Sound/stop Sound Button
i want to make a single button to play a sound, and if pressed again, stop the sound. and if pressed again, play the sound, and so on...
i know it has to be made with a boolean variable, true/false, but i just can't figure out how.
any help?
thank you very much.
Stop Scrolling Background And Zoom On MC
Hello, I am working on this page http://www.netimagegroup.com/images...nto/index1.html and what I would like to do is put a button on the movie clips that scroll. When the button is clicked the image zooms to the middle part of the page.
I know I need to use _xscale and _yscale and reposition the _x and _y when the button is pressed. When the user then wants to continue they can click another button and return the image to original position.
What I don't know how to do is stop the entire series of images (which are individual files) from scrolling. I want them all to come to a stop.
I am using ActionScript tweening. Here is my ActionScript in frame 1
imagename = "";
image1.onLoad = function() {
// this sets the initial x position of our clip
this._x = 20;
};
image1.onEnterFrame = function() {
if (this._x<-210) {
this._x = 810;
} else {
this._x = this._x-1;
}
};
image2.onEnterFrame = function() {
// this sets the initial x position of our clip
this._x = 241;
};
image2.onEnterFrame = function() {
if (this._x<-210) {
this._x = 810;
} else {
this._x = this._x-1;
}
};
image3.onEnterFrame = function() {
// this sets the initial x position of our clip
this._x = 474;
};
image3.onEnterFrame = function() {
if (this._x<-210) {
this._x = 810;
} else {
this._x = this._x-1;
}
};
image4.onEnterFrame = function() {
// this sets the initial x position of our clip
this._x = 703;
};
image4.onEnterFrame = function() {
if (this._x<-210) {
this._x = 810;
} else {
this._x = this._x-1;
}
};
image5.onEnterFrame = function() {
// this sets the initial x position of our clip
this._x = 860;
};
image5.onEnterFrame = function() {
if (this._x<-210) {
this._x = 810;
} else {
this._x = this._x-1;
}
};
Thanks for your help.
Start And Stop A Scrolling Background
hello everybody,
I'm having a problem with controlling a scrollable background. It's a vertical background that moves up and down with the mouse direction. in the bg are mc's where you can stop. if you click on an mc the bg locks on that position.
the mc animates and there is a button that you can click on when you want to move on
I can't get the bg to unlock when you want to leave the mc and move on to the next one.
I used the following code for the scrollable bg:
-----------------------------------
onClipEvent (enterFrame) {
if (_root.mainVar == 0) {
homeY = (-_root._ymouse*4.4)+1;
} else {
homeY = (-_root.mainVar*4.4)+1;
}
thisY = _y;
diffY = homeY-thisY;
if (_root.mainVar == 0) {
moveY = diffY/50;
} else {
moveY = diffY/50;
}
_y = thisY+moveY;
}
--------------------------------------------
and this one for locking the bg;
--------------------------------------------
on (release) {
_root.mainVar = 360.5;
}
-----------------------------
I hope someone can help me.
Thanks
How To Stop Progressive FLV From Loading In The Background?
I have a serious bandwidth problem with a site that has a couple of progressive flv files playing. I just found out that flv files didn't used to stop loading on the background even after netstream is closed, at least on some platforms had problems with this issue.
Does anyone have any recent information about this?
The two situations with the videoplayer that I am curious about:
user changes video file, by pressing a "next"-button on the videoplayer swf, but the first flv file keeps also loading on the background. In other words, the swf videoplayer is now showing the second flv, but the internet connection is used for loading two files, though the other one was already closed in the videoplayer swf, with a netstream.close...
in the other situation the user goes away from the html page that contains the swf videoplayer and I am now asking, if anyone knows what happens to netstream in this case, does the flv keep loading still? I have read some old posts from other forums, including macromedias livedocs, saying that the flvs should stop loading, but in many cases haven't.
Any help would be much appreciated!!
cheers.
FLV Player - Can It Stop A Background Loop?
Hello -
I have a looping MP3 as my site's background music. The client would like to include a YouTube video on the homepage. Is there a way to make the video stop the background loop when the user hits "Play"? What about using an embedded FLV player?
Thanks in advance.
Make Background Music Stop With Button
I have an entire site in Flash MX and all is perfect except one thing...the sound.
When the intro starts some background music starts, and it loops 999 times so that it continues to play throughout all the scenes. I want the user to be able to press a button to stop and a button to start the sound when they get tired of it or want to restart it. I have created the buttons, but have no idea how to get the actions to work. (I want to make sure the sound starts off playing on the intro..not to be turned on by the button..and that part works just fine)
My sound starts on the main timeline of the first scene by dragging it onto the stage and looping 999 times. There is no "linkage" set. I want to place the buttons on every scene. My sound name is 'background'. I have not set variables or anything, dont know if i need this. I have tried everything but the right thing. I need HELP! Thanks....I can send file if you need it.
How Do I Stop Flash From Showing A White Background?
My Flash movie has a black background.
On my webpage... for a split second before the move lads... a white background is shown.
How do I stop this?
How do I get it to show black from the begining?
I wasn't sure what terms to search for, for this problem.
Thanks.
OM
Stop Background Scrolling On Popup Load
Hi everyone,
I need your help,
Before saying anything let me describe a little about what I have done. Its an online project assignment. I created a shop where they have lots of sports related products in it and they can click on those products to bring the pop up window which have the real image and information about it. The shop is all vector cartoons. The shop is long in width so it has one scroller dependent upon the mouse movement. If the mouse moves from middle to left it will move left and vice versa.
Now the problem is when we click the product to bring the pop up and when we move the mouse on that pop up (as the pop up is interactive/has links) the shop in the back ground moves too. It makes my animations and rollovers very slow which I hate. Please provide me some solution so that I can stop the movement in the back when the popup loads and when we unload or cross it, the background starts moving again.
That's all about it, please reply me with some scripting help so that I can finish it. It the last week for submission with this only problem I don't want stuck just because of it. Come'on I m sure you can help me.
Thanks
Madhav ojha
Start And Stop Background Music With One Button
I'm working on a small problem, but I can't solve it!
I'd like to have a button or even a picture called music
which should stop and play the background sound. To stop is no problem,
but to start it again if the sound has stoped, is quiet difficult!
How can I start the sound again?
Could anyone give me a hit, how to program that?
Thank's a lot for helping me!
How To Stop Panning Background When Mouse Stops Mo
Hello all,
I have a background that pans left and right depending on which way the mouse is moved. Is there a way that when the mouse has stopped moving that the panning also stops, then restarts when the mouse starts moving again?? Thanks in advance.
Adding Background Music, Stop And Playing At Certain Times
Okay, when I start my movie, I want the background music to play, but when I go to the next scene I want it to stop and play a different song. I am using actionscript, I exported my song using the linkage thing, so I want to use actionscript also because I will be creating play and stop buttons. If you have any suggestions on those too you can post them Thanks to anybody that can help!
[CS3] Making Background Music Stop 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.
How To Stop Panning Background When Mouse Stops Moving
Hello all,
I have a background that pans left and right depending on which way the mouse is moved. Is there a way that when the mouse has stopped moving that the panning also stops, then restarts when the mouse starts moving again?? Thanks in advance.
How Do I Stop All Sounds In The Middle Of A Scene And Start Another Music Background
Hi All
I am working with Flash 4.0
I am trying to stop all sound on a keyframe in the middle of a scene and start a second sound a keyframe later. I can get the second one started but the first one doesn't stop.
I have set the property on the keyframe to stop all sounds, but the sound doesn't stop.
Any ideas?
I can get the sound to stop when I click a button to go to the next scene but not in the middle of the scene.
Thanks
Digital Editor
Sound.stop Is OK, Sound.start ?
I create a button that stop sound, but i do not know how to create a button that will start to play that sound again.
I try with sound.start but does not work, pleas help?
Stop Sound On A Specific Sound
I have a main timeline with 3 frames. Each frame has a different movieclip but with the same background music. In frame 2 of the main timeline, I have a movieclip that also has sound. If they hit the next frame button from the
main timeline in while in frame2, the sound continues onto frame 3 of the main timeline. I want to stop the sound from the movieclip in frame 2 but not the background music which continues from 1 through 3.
In frame 2 I have a lightning flash - the wav file has linkage as lightning ----
_root.l = new Sound();
_root.l.attachSound("lightning");
_root.l.setVolume(85);
I start frame 3 of the main timeline with this but it kills the music as well ---
_root.l.setVolume(0);
PLAY Sound And STOP Sound
I have no clue how to play and stop sound. I tried everything but I guess I am doing it wrong!
basically...... the name of the clip i want to play is
sound1
i have a little play button and a little stop button
i need the code so that it will play sound1 when clicked on
and the stop button i just put stop all sounds so i guess that should take care of it..but if that is wrong then please let me know, lol
thanks
xox marqi
Sound Stop And Sound Start
Hi There.
I have the follwoing problem. I have this play/pause button that toggles. This works. When clicking it the movie freezes and when clicking it again it runs. I have now added sound to the timeline, and what I want is that when clicking the pause button the movie freezes but also the sound freezes. Clicking the pause button again should start the movie and the sound again.
I have written the follwoing actionscript to the button:
Code:
isPaused = true;
allSounds=new Sound();
this.movieClip.play_btn.onRelease = function() {
isPaused = !isPaused;
movieClip.gotoAndStop(isPaused ? 1 : 5);
stop();
_root.allSounds.stop();
if (isPaused==true) {
play();
trace("We are rolling");
trace("and this is frame "+_root._currentFrame);
_root.allSounds.start(0,99);
}
}
It does half of it good. When I now click the button, the movies freezes and the music stops. When I click again the movie starts again, except that I do not hear any sound anymore. I am sure it is just some simple error, but any tips would be welcome!
Thnx!
How To Make A Sound Stop Only That Sound...
i think my problem is simple but i just am not getting a certain code. ok i have a radio in my flash mx vid. when i click it once. it plays music. when i click it again, it stops it all sounds. how do i make it just stop THAT sound?
{Radio} <---- movie clip
Sound Object - Specifying Only Certain Sound To Stop
Hi everyone. I'll try to make this as brief as possible. I am creating a flash project which contains video on a few pages. The project also contains background music which loops contiuously.
The goal is to have the background music stop whenever the user is on a page containing video and for the music to play again when the user leaves said page.
The script I created works to stop the music, but it also stops the audio contained within the video and causes the video player (by proxxus) to lock up.
The solution is probably a simple one, but I'm having difficulty figuring it out.
If anybody can see where I've gone wrong, your help would be greatly appreciated. Here's the setup:
Library:
music.wav - linkage = "myMusic01"
Main Timeline:
Code:
//-- create a variable to determine if the current movie contains video
var currMovie:String = "notVideo";
//-- start playing sound object
myMusicMc.myMusic.start(0, 999);
myMusicMc (residing on main timeline)
frame 1
Code:
//-- set up sound object
myMusic=new Sound();
myMusic.attachSound("myMusic01");
frame 2
Code:
//-- check the variable "currMovie"
if (_root.currMovie == "Video") {
_root.myMusicMc.myMusic.stop();
} else {
_root.myMusicMc.myMusic.play();
}
frame 3
Code:
//-- create a loop to continuously check the variable
gotoAndPlay(2);
on the actions layer of the movie clip containing my navigation controls
snippet of the callback used
Code:
videoLink_mc.onRelease = function() {
_parent.prodDetail_mc.gotoAndPlay("video");
_root.currMovie="Video";
}
on all the other buttons currMovie is set to "notVideo"
Stop Sound To Start Another Sound
I have a movie -a read aloud ebook for kids-with a main soundfile, and buttons with soundfiles (definition of the word in the text). I need to be able to click on the word definition button, stop the main soundfile, listen to the word definition button soundfile, then return to the main soundfile. Everything in the movie works perfectly except that with the code below (on each button), on rollOver ALL sounds are stopped, and I can't work out how else to do it. Can anyone show me how to do this without the onRollover please?
on (rollOver) {
stopAllSounds();
}
on (press) {
_root.play();
}
on (release) {
_root.stop();
_root.btnStopPlay.attachMovie("mcButtonPlay", "btnPlay", 1);
}
How To Make A Sound Stop Only That Sound...
i think my problem is simple but i just am not getting a certain code. ok i have a radio in my flash mx vid. when i click it once. it plays music. when i click it again, it stops it all sounds. how do i make it just stop THAT sound?
{Radio} <---- movie clip
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.
|