ActionScript 2.0 :: Stop A Sound Then Play Another And Back To It ?
Sep 4, 2010Stop a sound then play another then back to it ?look at the Attachments files
View 2 RepliesStop a sound then play another then back to it ?look at the Attachments files
View 2 Repliesi 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.
I am working on an application that mixx sound and then export it into a specific fotmat like mp3.
is ther a way to mix multiple data sound in one bytearray without playing it.
flash media server ,provide property Microphone.names that retrieves an array of strings reflecting the names of all available sound capture devices. is there is any property that detect output device attached to system so i can select which one to play back sound. for example:- i need to play back mp3 file in flash. but i have more one output device installed in my pc. the question is:- is there is any way for falsh to list all (or detects) audio output device installed in my pc then let me pick one of them to play back sound by selected output device?
View 7 RepliesI want to use a sound loop in my flash movie. The movie has many scenes. And the problem is that when I go to next scene or different scene I hear the sound repeating twice. I mean sound does not stop from first scene and begins from the different scenes.Is there any way to play sound like "stop all sound" option in Flash.
View 6 RepliesNormally, I want the movie to play the tween that spans from 25 to 35, then stop UNLESS a button has been clicked back on frame 24 - then I want the tween played from 25 to 35 then jump to 46.Problem is, in the button function code, if I have...gotoAndPlay(25); gotoAndPlay(46);the timeline jumps straight to 46 - it doesn't play 25-35. Why?I tried putting a timer in between the two gotoAndPlays, but itignored that too and jumped to 46.o how do I tell it - 'play from 25-35 and stop, unless but_a was pressed back on Frame 24 - then play 25-35, and then play 46' ?
View 7 RepliesI made to player with only the buttons play and stop, I tried to make that button toggle, but I did not works, then I made two buttons, when I click in play it shows a button and hides the other and vice versa, he functions normal, my problem is the following one:
When finishes the music the button not return for stop button, it continues showing to the animation of the play button , How can I make when to finish the music the button comes back to the state where it was.
[Code]...
When you click the first time on the button, it should start the song, when you click a second time on the button, it should stop the song. how do i make this with actionscript 3?
View 1 RepliesI have 2 samples that play with a click on a button, however, I want one of them to stop playing if the other one is played; so that only one sound will ever play at any one time.
View 9 RepliesI am trying to make some sound script for my website, but I need to stop the sound when portfolio's class will open.[URL]
View 7 Repliesmake the sound play first and then stop it?
var music:Sound;
var trans:SoundTransform;
var channel:SoundChannel;
var musicOn:Boolean = true;
[code]...
When my avatar bug makes contact with another type of bug, he eats it. Both bugs are movie clips; when the avatar gets into the collision detect zone of the edible bug, it triggers a quick animation in the "edible" bug: he becomes a blur for one frame then disappears (as though eaten).
The problem is the sound effect - a quick "whoosh". It needs to play once then stop. What happens now is that it's triggered repeatedly - a problem if the avatar passes over the edible bug slowly. If the avatar later passes over the spot where the edible bug was, the sound is triggered multiple times again. So I need the sound to play only once, then stop. There will be several copies of the edible bug's movie clip that need to behave the same way, so once the sound stops playing it needs to be available again for the next collision.
Here's what it looks like now:
private var sfx_edible:Sound = new eat();
function detectCollision(myevent:Event):void {
if (avatar_mc.hitTestPoint(edible_a.x, edible_a.y, false)==true) {
[code]....
I am trying to control Sound with actionscript and play and stop buttons.
This is the script I have in frame one of my scene.
[Code]...
playB is the instance of the play button stopB is the instance of the stop button the sound intro is on its own layer and is selected as a streaming sound. My problem is that when I stop and start the sound with the buttons the sound starts from the beginning instead of playing from the frame it is in.
Pause and Resume external SWF sound filesI have this code that plays the sound through linkage. It reside in scene1.fla -> scene1.swf.
var mc:MovieClip = this.createEmptyMovieClip("mc",1);var myLoop:Sound = new Sound(mc);myLoop.attachSound("bg_sound");myLoopVolume=0;myLoop.setVolume(myLoopVolume);
mc.onEnterFrame = function () { if (fadeIn01==1) {
[code].....
I made a webiste with bg sound home, portfolio, gallery, contcts. This are the links. when click portfolio, which contain a flv file, when clicking the flv file bg music stop and video will play smoothly.But if i navigate to other links the sound from the flv remains their and my bg music not playing also.. one code SoundMixer.stopAll(); i got this code b4, it vil stop all sounds... i dnt need to stop the background music, i need to stop only my flv video sound.. there's a bg music playing, when entering to the portfolio section thers a flv video vth sound. i can stop all other sounds ven playing this flv video but i cant stop this sound ven navigating to other sections and i need to continue the bg sound ven navigating to other sections...
View 1 Repliesi am using soundmanager to order sounds. my site preview, in home page, square shapes comes into stage and you can drag drop them, all shapes binded its own sound. if they are colliding binded song will play.
the problem is i have 3 second timer to control sounds. every timeout i have to stop sound and play again for synchronous issue, that is my solution for that part. but sometimes before loop, there is an annoying little silence.
I have added some three sound clips, play pause buttons, on the root timeline in a movie with corresponding callouts. I am able to stop all sounds on the main timeline by below
stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
function stopSound(event:MouseEvent) {
SoundMixer.stopAll();
}
But now how do I resume all the sound to play. In sort, mute unmute root sounds in AS3.
i'm habing abit of problem with this code, its supposed to play pause and stop, the problem being that when i press stop then play it only plays from the last pause and not the beggining how to get it to play from the start after the stop button is pressed
[Code]...
the method for stopping/playing sound in 2.0 don't work for 3.0. i can stop the sound by going to a different page/frame on the site.but i want the buttons.
1. play button?
2.stop button?
3.mute button?
I created a movie clip that I am using as a button. I created the states in the clip (up, down, over) and the graphics work, but the sound is driving me crazy. I have a rollover loop that plays and a special click sound on the down/press. On the mouseclick, I want the rollover loop to stop and the down/click sound to play. Also, a getURL is happening on the release. Basically, everything works, except you can't hear the down/click sound. All sound just stops on the click.THis is AS2. Here's my code on the first frame. In the clip/button itself, I have the states labeled, the sounds placed using the properties and a stop on each keyframe of each state.:
playa.onRollOver = function() {
playa.gotoAndStop("_ovr");
}[code]/.....
I'm new to Actionscripting and I want to add a sound file to my project with controls to stop and play and a volume slider. I'm using this actionscript for the controls. It works but right now you need to click the play button for it to start. Is there a different way to write it so that the music starts playing when the scene starts, and then the user can stop or play it again and change the volume?[code]
View 3 Repliesgive me the actionscript for a bar that has a play and stop button to play and stop frames in a flash movie. i would be gratefull if you could as i am really stuck
View 2 RepliesI have a movieclip that I want to be scaled to 400.After that I don�t want it to scale anymore.How can I stop it going back to it�s original value and scale again and again.I have the as in "On enter frame",I dont want a button to be pressed to start scaling.
View 6 RepliesI have a bit of a problem with sound.. I have a main container animation with background sound that's loaded with soundChannel..I also have an externally loaded SWFs with Movie Clip buttons that have a sound ON ROLLOVER on the timeline..after rolling off - I place the:SoundMixer.stopAll();to stop the button from playing the sound once the mouse is rolled off.. However, the problem I'm running into is that it also stops the sound of the main container movie cli
View 1 Repliesi have programed a play button using:
[Code]...
now i am trying to program the stop button to allow the user to stop mid song....
I am using FLASH CS3.I have gone through many posts, seems to be an issue with many people.Still haven't come across a fix.Website made in FLASH. Flash movie loads and sound works great!I have a button with 'StopAllSounds' action script.[code]When I go back to main page... sound starts up again.Is there a way I can stop all sound regardless of where the visitor goes on the website?
View 2 RepliesI'm sure this is a common problem, I tried looking around on the forum for a problem like mine but was unable to find anything. I'm using Flash CS3, Actionscript 2.0, and am making a soundboard. I have two scenes, one that's the title screen, of which has a sound file loaded via the timeline, (I think) set to Event and Loop, and a button which takes you to the next scene and makes a short sound when it's pressed. My second scene has background music as well, also set to Event and Loop.
Problem is that when I press the button, the background music keeps playing into the next scene. I tried using putting stopAllSounds onto the button, but that makes the sound of the button stop as well, and I'd really like to keep it. I've been messing with this for days, and I can't figure it out.
It's possible to play a sound file through AS, either by loading it from a folder or import it to flash. It's also possible to play a dynamic tone with flash.media.Sound + writeFloat.
But... is it possible to play a sound file with flash.media.Sound + writeFloat in some way? I want to play a sound file without having to deal with any files except the .swf!
I just got Flash CS3. I'm trying to get my main timeline to stop in the begining, on button press to play and at the end stop again. In AS2, you would just put stop(); on the first keyframe and stop(); on the last key frame and program your buttons accordingly.
The stop(); does not work!!!! It's driving me crazy. What am I missing? I've gone through the tutorials in Flash and they don't work either.Also, if you have MovieClip that contains an animation and you don't want the movie clip to be on a continuous loop how do you stop it from playing. In AS2, I would put a stop(); on the last keyframe of the movieclip's animation. This also does not work in AS3.
Is it possible to play and stop a number of frames later, without using stop() in the frames? Like when I click a button frame 20 will start playing and it stops 30 frames later, all defined by the actions of the button..
View 3 Replies