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








[CS3] Stop All Sound And Play Next


ok so what i have is a flash based web site on a guitar, my nav bar is the neck of a guitar and the chords are the buttons.
the buttons are movie clips with an animation, i have scripted each movie clip so it stops at frame 1, on rollover play until certain frame, on release play rest of movie clip, script is this:

-------------------------------------------------------------------

var buttonAction:String = "stop";

this.onEnterFrame = function(){
if(buttonAction == "stop"){
stop();
}
if(buttonAction == "roll over" && this._currentframe < 35){
play();
}
if(buttonAction == "roll over" && this._currentframe == 35){
stop();
}
}

this.onRollOver = function(){
buttonAction = "roll over";
}
this.onRollOut = function(){
buttonAction = "return";
play();
}
this.onRelease = function(){
_parent._parent.gotoAndStop("Home");

}


-------------------------------------------------------------------


Script works fine i'd prefer not to change it.
what i want is to play a sound on frame 5 but when i roll over a different button it stops all other sounds from playing then plays the sound in that movie clip.


this is for an assignment due tomorrow so any quick help would be greatly appreciated!



(if i didn't explain enough please let me know)




FlashKit > Flash Help > Flash ActionScript
Posted on: 06-16-2008, 05:49 AM


View Complete Forum Thread with Replies

Sponsored Links:

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

View Replies !    View Related
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.

View Replies !    View Related
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.

View Replies !    View Related
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

View Replies !    View Related
Play/stop A Sound
okay i really need help.. ill attach a sound file.. if someone could plleeasee make an .fla file where a button is set to play and stop some given sound... like an on/off switch.. i would attach my .fla file but its more than 2 mb.. so i really need help.. thnx!!

View Replies !    View Related
Sound Play Stop ?
hello all, i have 4 mp3s
i am working in a scrollbar and i just want a simple play and stop button for each one..maybe loaded from an external file...
how i can do that ? any help ?

View Replies !    View Related
Mp3 Sound - Play And Stop
I 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.
AS
code:
var mp3Musica:Sound = new Sound ();
//
tocar_mc._visible = true;
parar_mc._visible = false;
//tocar música
tocar_mc.onPress = function () {
tocar_mc._visible = false;
parar_mc._visible = true;
mp3Musica.onLoad = function (sucesso:Boolean) {
if (sucesso) {
mp3Musica.start ();
}
};
// carregar música
mp3Musica.loadSound (_root.musica, true);
};
//parar musica
parar_mc.onPress = function () {
tocar_mc._visible = true;
parar_mc._visible = false;
mp3Musica.onLoad = function (sucesso:Boolean) {
if (sucesso) {
mp3Musica.stop ();
}
};
mp3Musica.loadSound (_root.musica, true);
};
//cor fundo botao
new Color (tocar_mc.fundo1_mc).setRGB (parseInt (cf, 16));
new Color (parar_mc.fundo2_mc).setRGB (parseInt (cf, 16));


Sorry about my English

View Replies !    View Related
[CS3] [AS2] Sound Stop And Play
I'm making a game; frame 1 is the main menu and also contains music... Now on the main menu has buttons like "options," "controls," etc.. Now once I click on one of them it goes to another keyframe; and on that keyframe is also a back button to the menu; once you go back to the menu the music is played twice... I want to make sure that dosen't happen. I tried some codes such as stopAllSounds but everything I tried didn't seem to work for this simple problem; so I'm looking for a workaround for this...




Thank you for taking your time to read this...

View Replies !    View Related
Mp3 Sound - Play And Stop
I 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.
AS

ActionScript Code:
var mp3Musica:Sound = new Sound ();
//
tocar_mc._visible = true;
parar_mc._visible = false;
//tocar música
tocar_mc.onPress = function () {
    tocar_mc._visible = false;
    parar_mc._visible = true;
    mp3Musica.onLoad = function (sucesso:Boolean) {
        if (sucesso) {
            mp3Musica.start ();
        }
    };
    // carregar música
    mp3Musica.loadSound (_root.musica, true);
};
//parar musica
parar_mc.onPress = function () {
    tocar_mc._visible = true;
    parar_mc._visible = false;
    mp3Musica.onLoad = function (sucesso:Boolean) {
        if (sucesso) {
            mp3Musica.stop ();
        }
    };
    mp3Musica.loadSound (_root.musica, true);
};
//cor fundo botao
new Color (tocar_mc.fundo1_mc).setRGB (parseInt (cf, 16));
new Color (parar_mc.fundo2_mc).setRGB (parseInt (cf, 16));

Sorry about my English

View Replies !    View Related
Mp3 Sound - Play And Stop
I 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.
AS

ActionScript Code:
var mp3Musica:Sound = new Sound ();//tocar_mc._visible = true;parar_mc._visible = false;//tocar músicatocar_mc.onPress = function () {    tocar_mc._visible = false;    parar_mc._visible = true;    mp3Musica.onLoad = function (sucesso:Boolean) {        if (sucesso) {            mp3Musica.start ();        }    };    // carregar música    mp3Musica.loadSound (_root.musica, true);};//parar musicaparar_mc.onPress = function () {    tocar_mc._visible = true;    parar_mc._visible = false;    mp3Musica.onLoad = function (sucesso:Boolean) {        if (sucesso) {            mp3Musica.stop ();        }    };    mp3Musica.loadSound (_root.musica, true);};//cor fundo botaonew Color (tocar_mc.fundo1_mc).setRGB (parseInt (cf, 16));new Color (parar_mc.fundo2_mc).setRGB (parseInt (cf, 16));


Sorry about my English

View Replies !    View Related
( Urgent) My MC Can Stop N Play, But How To Keep My Sound Going?
Hi, ppl...regarding the MC which i ask for your help last time, it works..but is there any way to keep the sound going?
cos once i stop the clip, the sound stop n it cant play anymore..Pls help me...thanx..
i need to hand up tis clip today, so ur help will be a very big deal to me...Thanx!

View Replies !    View Related
Play And Stop Button Sound
hey people how can i make a play and stop button for sound on my flash movie?

I am Using flash 5.

Ps. I have a stop button and a play button.

View Replies !    View Related
Play And Stop Button For Sound
hey people how can i make a play and stop button for my sound on my flash movie?

I am Using flash 5.

Ps. I have a stop button and a play button.

View Replies !    View Related
Sound Play And Stop Problems
I've run into an audio problem and I will do my best to explain it. What I have is 1 scene, which contains 2 layers. One layer has my main movie clip and the other has a stop(); command. Inside my main movie clip I have boxes opening with 401k investment descriptions and audio reading them off. At the end of all the descriptions I have 3 buttons that on (rollOver) gotoAndPlay a specified frame and rolls down a submenu containing buttons. If you click one of the submenu buttons it takes you back to the beginning of that button's investment description. My goal is to get the audio to NOT PLAY AT ALL once the timeline has reached the 3 main buttons. When you click one of the submenu button's and it takes you back to where it opens a window, displays the definitions text, and then an exit definition button I want to have the audio totaly dead. And when they click the exit definition button it's told to jump to a certain frame where it clears the defintion text from the window, rolls the window back up and cleared and then jumps to the frame where the 3 button's are. I cannot attach the file because it's 23mb's, obviously file size was not important with this project LOL so... If anyone has a fast connection dsl or higher I can send the .fla to you through MSN Messenger. Or, if you want to take a crack at adjusting my code without having the "many" audio files I could remove all the audio files, which would allow me to attach it. I could even give the frames frame labels where each audio file starts. But I'm not going to do all that unless I have to My MSN addy is andrewj2883@hotmail.com

Thanks,
Stea|th

View Replies !    View Related
Sound Play Stop Problem
hello all, i have a small problem
i have an audio player loading 4 separate songs but
they are 4 different PLAY and STOP but
if you listen to the tracks all the way through until they stop themselves, the play button doesn't work again, until you click stop, even if the track has stopped.
any help ?

View Replies !    View Related
[F8] Stop/play Sound Behaviors
I want to create three interactive music buttons on a Flash8 website. I tried following the instructions in the help files about controling sound playback using behaviors. I was able to create "play" and "stop" buttons for the three mp3's I want people to be able to play, but only the first one works. All three live in the same keyframe, on the same layer, link to mp3's in the file's library and reference each mp3 as an instance in order to play and stop. Why will only one set of buttons work?

View Replies !    View Related
[MX] Sound Stop Then Play Problem
it doesn't start playing angain

Code:
onClipEvent (enterFrame) {
stopAllSounds();
}
on (keyPress "<Space>") {
_root.snd.start(0, 10);
play();
}

View Replies !    View Related
Control Sound: Stop And Play
I know that this forum has several posts on this. I've read them, two book chapters, and numerous websites. I have, no lie, 12 versions now and nothing actually works. Everything comes close, but no cigar.

for example, if i have separate play and stop buttons, if you keep clicking on play, you get dozens of your audio at once. In another code, you have to click on the play button twice to get the audio started. in another case, the audio plays once, finishes and then clicking on play never plays it back again.

Sometimes I feel like i've walked into the middle of a movie. A post will say create a toggle button then use this code. But it doesn't say if there's any code itn the toggle button, whatever.

I know this is possible. And I guess I'm a dolt. Can anyone help me. thank you

View Replies !    View Related
Play And Stop With Sound In Flash?
Hey guys I am new to to flash I can only create basics animations and stuff but I have been reading books and trying to create a play and stop file using flash but I can't so I found this site which I think is great!!!....and if any of you can help me I would appreciate it so much....by the way I am Matias Bulox from Argentina.
Ok I guess I have explained my problem....I'll wait for somebody to response.

Check my 2 sites
http://www.clearealty.com
http://www.books-softwares-online.com

I am still working on both of them but I need your help!!! please.

Bye and have a nice day!!!
and Merry Christmas for everybody !!!!!

Matias Bulox

View Replies !    View Related
Sound Stop/play Buttons
Hi - I am trying to make a background loop which will play automatically when a page loads and to display a stop button which will stop the music when clicked.
I managed to do this much, however, when the stop button is clicked, I would like to display a play button which will start the music again when clicked. I could not figure out how to do this. I've read several tutorials, but some of them seem outdated and others did not seem to work.
Can anyone give me some advice or direct me to a tutorial which would explain how to do this correctly?
Here is the FLA so far: http://www.seniorspin.com/MyMusic.fla
Thanks, Elizabeth

View Replies !    View Related
Play And Stop Button For Sound
I would like to create 2 simple buttons fot example a round button for playing my sound and a triangle for stopping my sound.creating the buttons and stuff is not the problem but i dont know wich actionscript i should use to get the sound started en stoped when i click on my button?

View Replies !    View Related
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

View Replies !    View Related
Straming Sound With Play And Stop Button
i have created a stop and play buton which is controling a audio loop on my current website. But how do i get the sound to loop automatically without the user having to press the play button for it to play. whilst still having the option to stop it.
thanks to all
tony

View Replies !    View Related
One Button Stop/play Sound Object - MX
I'm using MX and taken some Flashkit tutorials on sound objects, but I can't seem to get one thing to work. I'm trying to create one button that, when clicked, stops a sound object if it's playing and start it when it's not playing. I know how to create separate stop and play buttons, but for this project I need them combined into one button. I can get the sound object to stop, but not to play again. Any help would be much appreciated, thanks and have a great day!!!

Laters....

View Replies !    View Related
How To Stop N Play Back Sound At The Same Time
im doin my flash project...n i failed to stop da sound...i try usin da stopAllSound it worked but i wanted to play another sound at da same time....i mean at the scene without playin da first sound...mail me???????? or reply to me as soon as possible....

View Replies !    View Related
Streaming Sound Stop/play Problem
Dear all,

I am a flash "advanced beginner' and what I intend to do is this: make a simple streaming mp3 player that loads mp3 file, plays it automatically, but when user changes page (or refreshes) I want to resume playing the song from the very last position before the page has been refreshed (to mimic somehow the continuous play).

Communication works fine through cookies, no problem there. The only problem that I don't understand is when I try to play the sound from specified (read from cookie) position, i.e.: sound.start(fromPosition) - I explain:

I understand that when using streaming sound, it starts to play from the beginning automatically after sufficient portion is downloaded. I thought that I could overcome this by stopping the sound just after loadSound command and then again start it from given position, but this doesn't respond:

myTunes = new Sound();
myTunes.loadSound(somesong, true);
myTunes.stop();
myTunes.start(fromPosition);

song only stops immediately after page refreshes, but doesn't start again..

I have also the play/pause button and there it works (playing from the paused position)

I would be very happy for any suggestions, thanks much..

cheers..
T.

View Replies !    View Related
Stop The Sound From One Movie When Another Begins To Play
Hi and Help!

I've been killing myself to get this to work. I have multiple .swf files loading into on file based on button clicks. That part works great! The problem: when you click to load the next movie, the sound from the first still plays. I've tried everthing under the sun. Can someone please enlighten me???

Here's what I have that works (with the exception of the sound):

var fileName:String="begin.swf";
var loader:Loader = new Loader();
var requestURL:URLRequest = new URLRequest(fileName);
loader.load(requestURL);
holder.addChild(loader);

airButton.addEventListener(MouseEvent.CLICK,airBut tonListener);
earthButton.addEventListener(MouseEvent.CLICK,eart hButtonListener);

function airButtonListener(event:MouseEvent):void {
loadFile("air-JWfinal.swf");
}

function earthButtonListener(event:MouseEvent):void {
loadFile("earth-JW.swf");
}

function loadFile(fileName:String):void{
requestURL.url = fileName;
loader.load(requestURL);
holder.addChild(loader);
}

View Replies !    View Related
Making Sound Stop And Play In Flash
How do you make sound "STOP" and "PLAY" in flash. Like when you have sound in the background in your flash movie and some people don't like to here sound and they can turn it off. or turn it on

View Replies !    View Related
VIDEO PLAY BACK - SOUND (Stop A UIloader?)
PLEASE HELP ME SOMEONE!! I am going to rip my eyes out!

Here is what I have set up:

I have a website... http://www.thedrewblood.com

I have several pages set up on a main time line. Siting on my main time line is a UI loader that automatically loads an mp3 player, which the client wants to play through, with out interuptions. The pages have labeled frames, and the buttons have eventlisteners to move the time line to the specific frame. On this frame (say it is "video") I have a movie clip, with the page content. Inside this movie clip time line I have a ui loader which will load my flv playback component with various video.

So, the video loads perfectly, and everything is fine. However, there are some complexities that I would like to remedy.

when you navigate away from the "video" frame, the sound from the video continues to play. I would like that sound to stop, or is there a way to stop the ui loader?
I want the video to play, and stop as you leave the frame because I don't want the ui loader for the mp3 player to be interrupted.

If anyone can help me it would be greatly appreciated!!

View Replies !    View Related
Create Play And Stop Buttons For Movie And Sound
Hey,
sorry if this has already been asked, I couldnt find it.
I have a movie I made and I want to give the user some control by creating play and stop buttons.
I made the buttons, however when i stop the movie it cuts the sound as well (which i want), BUT when i then push the play button, the movie plays but the sound stays off.

Is there a way to make the sound and movie play with a play button?

thanx in advance

View Replies !    View Related
How To Create Looped Sound Clip With Play/stop Buttons?
Hi everyone, basically, What I want to happen is when the flash file loads up on my page a small soundclip (.wav) starts playing, and it has to be looped so it plays exactly continuously and seamlessly; there can't be a 'gap' when it reaches the end and starts playing again.

I'd like to offer two controls: a stop button so people can stop it, and a play button so they can start it up again if they wish.

If that's too complicated then just the stop button would do.

When I've tried to do this myself the sound loads up again after the stop button has been pressed and the play button didn't work.

Im quite new to flash so a step by step guide would be of great help.

Thank you very much for your time and help.

View Replies !    View Related
A Simple Music Player, Play, Pause Stop A Sound?
I need a simple way to play a wav file pause it and stop it ? What can I use to do this?

thanks

View Replies !    View Related
Stop And Play Audio Buttons With Stream Sound Timeline
¿Is there a way to get a full funcion play and stop button if sound is not exported on first frame from library and is located on timeline?

Pepetex

View Replies !    View Related
Kayboard Input To Play And Stop An External Sound File?
Hey all,

I know how to play an axternal sound file, i currently am able to play and stop my sound file with buttons, but i would like to be able for the user to press the 'S' key on the keyboard (or any key if it makes it easier) and then the sound is turned off and on. Can anyone help me on this in AS3?

View Replies !    View Related
Beginner Question: Show/Hide A Button To Stop/Play Sound
Hello,
I would like a movie clip in my site to either stop or play the background sound. This movie clip is visible by default on a frame. When I click the movie clip I would like it to disappear, stop the sound and be replaced by another movie clip to play the sound again.

In the stop sound movie clip I wrote:
on (release) {
stopAllSounds;
stop._visible = false;
play._visible = true;
}
But it does not work...

And what should I write in the play sound MC?

Thank you for your time.

Cheers

View Replies !    View Related
Stop Entire Video And Play When Button Is Pushed Including Sound
I have already set my keyframe to stop but I need to know how to
start again when a button that I created is pushed and have the sound resume from its point where it left off.

View Replies !    View Related
How To Create A Menu That Selects Sound And How To Make It Play Stop And Pause
Does anyone know a site where i can learn how to create a menu that selects sound and how to make it play stop and pause. like a mini player inside a movie. help.... Thanks

View Replies !    View Related
Swapping Buttons W/ AS...play To Stop/stop To Play
Hi,

I'm looking for how to swap buttons with actionscript. If my FLV is playing, display the stop button. If it's stopped, display the play button.

Here's my AS so far.


Actionscript Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
 
var ns:NetStream = new NetStream(nc);
 
theVideo.attachVideo(ns);
 
ns.play("intro.flv");
 
stopButton.onRelease = function(){
    ns.pause();
    _root.bulletlist.stop();
    isplaying = false;
}
playButton.onRelease = function() {
    ns.pause();
    _root.bulletlist.play();
    isplaying = true;
}
rewindButton.onRelease = function() {
    ns.seek(0);
    _root.bulletlist.gotoAndPlay(1);
    if(isplaying){
        ns.seek(0);
    }else{
        ns.seek(0);
        ns.pause();
    }
}

Could I get some pointers or a good link?

Thanks!

View Replies !    View Related
[F8] Movie Plays > Stop > Reverse > Stop > Play
I am fairly new to involved action scripting. I have successfully scoured flashkit threads for years to get my answers but this one has been driving me crazy for the past couple days. I have tried numerous solutions but none of them do exactly what I am trying to do.

I am creating an online portfolio that I want to control with two buttons that will play forward on release and stop at every piece unless the user is pressing and holding down - I also would like the scrolling animation to play in reverse on press and stop at every piece unless press and hold which happens to be skateboards in this section. I am posting the .fla for this section. This is what I have been able to accomplish so far. I moved everything into the main timeline from a movie clip because I could not get that to work at all. Should I move it back to movie clip? I also want it to stop at the first board.

here is the code I was able to peice together that just plays continously without stops.

Empty movie clip on second frame.

PHP Code:




onClipEvent (enterFrame)
{
    if (_root.goBack)
    {
        _root.prevFrame();
    }
    else
    {
        _root.nextFrame();
    }
    _root.frameNo = "Frame : " + _root._currentFrame;
}







Forward button.

PHP Code:




on (press)
{
    _root.goBack = false;
}







Reverse Button.

PHP Code:




on (press)
{
    _root.goBack = true;
}







I have only done basic stops; goToAndPLay, getURL and such I am a little out of my league here but I started the ball rolling and would like to make this work as I intended. Any help making this do anything close to what I am describing would be much appreciated

View Replies !    View Related
I Need A Movie Clip To Play, Stop And Play Again In The Next Frame
I need a movie clip to play, stop and play again in the next frame. So pretty much i have to get the movie clip to play once and stop then when you go to the next frame it should play again once and stop again. What i have is a slide show type thing where you click on the next button to advance to the next frame and in each frame i have all the animations in their own movie clips.

-Thanks

View Replies !    View Related
Add Skin And Buttons (play, Stop, Etc) To Play A Swf File
Hello Forum,

Is there a way to use a skin/buttons just like the FLVPlayer that will give the same control to a movie clip (aka SWF file)?

I have a few swf files that are movie clips - not video. I would like to be able to load the movie clip, and be able to start, stop, pause, mute audio just like the FLVPlayer component does, but for a swf file.

I would like to have a "component" with the buttons, etc and be able to load the movie clip using the loadMovie method, and play the movie clip. I have a clip that starts playing after I load it, but would like to load it, and have it stopped, and then play the clip using buttons, etc.

I do not want to add buttons to each of my swf files, but have one movie clip with buttons, and load a swf into it.

Any tips will help,

thanks,

eholz1

View Replies !    View Related
Making One Button Play One Sound And Another Play A Different Sound
i'm very much a novice when it comes to flash.
i've created three separate buttons in three separate layers. i've also added three music files in three more layers. how can i get it so one button plays one music file and another button plays a different music file? i've tried putting "goto and play" for each button in actionscript but it doesn't seem to help.

any ideas?

i would be very grateful

View Replies !    View Related
How To Play Sound Automatically And Trigger The Play And Pause On The Same Button?
hey guys,

is anyone know how to set a looping sound to play automatically but with a pause button to trigger its action? if i want the sound play back again could i just click on the same "pause" button to let it play again? pls help me to make it works thanks!!!

View Replies !    View Related
I Can Play Sounds From Xml. How Do I Only Play One Sound At A Time... Kill The Other
Code:
var mysound:Sound = new Sound();
mysound.loadSound(arVocab[_global.nCurrentWord-1][6], true);
This will play a sound but when I go to another question in my test the old sound still plays while the new sound starts.

How do I kill the old sound? When the new sound loads?

Glen Charles Rowell

View Replies !    View Related
.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.

View Replies !    View Related
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!

View Replies !    View Related
How To Play A Sound For 6 Times With Set Play Interval?
Hi,

I know how to play a sound effect:


Quote:




var mySoundReq:URLRequest = new URLRequest("laser.mp3");
var mySound:Sound = new Sound();

mySound.load(mySoundReq);

mySound.addEventListener(Event.COMPLETE, playSong);

function playSong(event:Event):void {
mySound.play();
}




The above sound effect play only one time. Actually I wish to play the sound effect for 6 times and at a set play interval (e.g. play the sound effect, wait 2 seconds, play again, wait another 2 seconds......). How can I do that?

I am thinking to use a Timer object. However I have no idea how to link with the playSong function.

Thanks and best regards

Alex

View Replies !    View Related
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!

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved