Stop the sound

Hey guys,.

I try to add two functions in a single button, first of all, it will take me to the next frame and the other stops the music being played

I have this written already, jump to the following framework works but the stop function does not work even if the program is still running and no error message come up... help

import flash.events.MouseEvent;

import flash.media.Sound;

import flash.media.SoundChannel;

Stop();

Create a new sound variable 'theSunSound' to the name of the given class

the audio file in the library 'theSunSoundFile '.

var theSunSound: theSunSoundFile = new theSunSoundFile();

Variable set

theSunSound.play ();

btnGoodJob.addEventListener (MouseEvent.CLICK, bGoodJob);

function bGoodJob(event: MouseEvent): void {}

gotoAndStop ("Start");

Create a new variable of channels of sounds 'theSunSoundChannel '.

/ * This is required only if the sound will do more than just play

That is to say: stop, pause, etc... */

var theSunSoundChannel:SoundChannel = new SoundChannel();

/ * Create a variable to store the position of the "read head".

of "theSunSoundChannel" * /.

var theSunSoundPausePosition:Number = new Number();

Set the time of the "read head" to 0

theSunSoundPausePosition = 0;

/ * Create a Boolean variable called 'theSunSoundPlaying '.

This goes from true to false as the case

"theSunSoundChannel" plays * /.

var theSunSoundPlaying:Boolean = false;

Stop playback of the variable "theSunSoundChannel".

theSunSoundChannel.stop ();

Change 'theSunSoundPlaying' Variable to false

theSunSoundPlaying = false;

/ * The 'theSunSoundPausePosition' value of 0, it

reset 'theSunSoundChannel' to read from the beginning * /.

theSunSoundPausePosition = 0;

}

Yes, somehow, but you define another instance of the string inside the function.  Get rid of that too.

Tags: Adobe Animate

Similar Questions

  • How to stop the sounds

    I encountered a small problem which is just my project look sloppy.

    When a person hits some buttons, a sound starts playing, but since the sound is long enough it just guard play and playing even after they are in a different domain.

    Even with a film, I have in the thing as well.

    How can I do when you press another button, I can stop the sound?

    Currently, it is set up like that...

    root

    Under root is the symbol screen

    Under the screen, after section 1 is a real symbol & the video file

    under actual finally is the audio file which is used...

    Try on properties of the (real) framework:

    under its:

    Sync: Stream (repeat: 1).

  • Stop the sound of a button

    Hello..

    I have a small problem with the sound... I have an animation of main container with background sound which is full of soundChannel.

    I have also an external SWF that is loaded with video Clip buttons that have a BEARING ON sound on the timeline... after rolling discount - I place the:

    SoundMixer.stopAll (); to stop playing the sound button, once the mouse is released... However, the problem I'm running into is that it also stops the sound of the main container - suggestions clip? Thanks a bunch in advance!

    everything in your last message is correct, except that you use the soundchannel to load a sound.  you will use either the "new" constructor to instantiate your sound (if sound is in your library) or if you use a sound instance and the load() method of the sound class to load your sound.  the soundchannel is what is returned after applying the play() method to your sound. instance.

  • How can I stop the sounds in this scenario

    Hello, I need help.

    I need to load an external .swf file in my new movie and stop the sound/music that plays in the file external swf. I need the sound/music to stop immediately on frame one. I do not have the FLA to the external swf file as its years. Can someone help me with this? I know there are 'stopallsounds();' but I do not think I use this right because it does not block the sound when I play the new exported swf.

    So to summarize - I loaded in a .swf on a framework (in a clip from the Virgin film) - and on another layer, tried to add the "stopallsounds();" HELP - music continues to play - action!

    Hey that worked - rule you! Thank you very much!

  • Stop the sound of back/forward

    I was wondering if there is any way to stop the rewind and advance fast sound you hear when you move the back or front chronological marker along your videos. Or is there a better way to quickly navigate through videos? I know that his happens because music, I added its annoying me...

    marker.jpg

    Céline

    Thanks for the reply. Just as I suspected.

    14 elements of first (the most recent version and just came out) has undergone changes in its mounting Panel. Especially ones involving audio tracks.

    Please refer to point 2 at the top of my blog first elements 14 First Look details ATR first troubleshooting items: first items 14 First Look details

    If you have the first 13 items, you do not have the muting of the audio track to which you were referred. In the first elements 13/13.1, these icons to the left of the track name are for display only - style for videos, 4 display styles to select from and for audio 2 display styles to choose one (with as wave and no waveform). But nothing of what I just wrote will influence your elements first 13 base want to silence the audio when you scroll the contents of the timeline.

    A possibility to explore

    1 video 1 video track with audio related on the Audio 1 track. And you want to scroll the timeline without the sound.

    2. open the Audio Mixer (mixer Audio/Menu Tools table) and put a check mark next to the button Mute for 1 Audio track. Resize the Audio Mixer Panel, it is out of your way, but you always silent access to the box.

    3. put the box of Mute, when you do not want sound. Remove the check mark for mute when you do not want sound.

    I'll think about it even more.

    RTA

  • Stop the sound when another sound bed

    Hey guys,.

    Using Flash Pro CC 2014, Actionscript 3

    I work on a soundboard and use buttons which sounds and I would like to indicate that when a new sound plays, it automatically stops the current sound of the game, which sounds way 2 does not play at the same time.

    But I also have a button which stops all sounds, I use the code 'Click to stop all sounds' Audio and video in Code snippets.

    So I'm basically wanting to make sure that I can do both, hold the judgment of all the key sounds, but also have when you press any button sound, it stops all sounds and starts playing the button / current. Any suggestions?

    BTW I'll implement the symbols such as buttons, not the clips video incase you need to know for coding, but I can switch to the clips if it's easier. I was just used to buttons on old versions of Flash for simple stuff like that.

    Thank you.

    the code that you have demonstrated stops all sounds (if there is) currently playing, and nothing else.

    I don't know why looks like it would be "..." immediately start playing the audio file that is located on this button".

    If you want sound to stop all the sounds and play NewSound, use:

    sound.addEventListener (MouseEvent.CLICK, fl_ClickToStopAllSounds);

    var sc:SoundChannel;

    function fl_ClickToStopAllSounds(event:MouseEvent):void

    {

    SoundMixer.stopAll ();

    var newSound:NewSound=NewSound();

    SC = newSound.Play ();

    }

  • Stop the sound on mouseout/mouseouthandler() - how/where add code

    I read through several threads, but I can't figure out how or where to add the code for the sound to stop on mouseout/mouseouthandler(). I read the messages that buzz.js might be able to help, but I need advice to apply it.

    The project is included in the download. The US Landmarks each have an animation that starts a stopover on mouseover and mouseout/mouseouthandler(). I need the sound that goes with each animation to do the same.

    Firefox handles its OK at first but then seems to get glichy. Chrome keeps all the loop sounds whenever I mouseover.

    https://www.dropbox.com/s/x2iih9sgqff316i/SummerTips_052114_0430.zip  I apologize for the large file. I am looking for an alternative to a single sound file that is larger than 6 MB.

    It is my first project in environmental assessment. I learned EA as I build it (conversion of project Flash that someone else did a few years ago). I'm sure that there are more effective ways to do a lot of what I have here, but it works in the way he needs, except for the sound.

    I am open to any suggestion. Thanks in advance for the help.

    Lynn

    Hello

    There are some errors in your code above:

    In the mouseenter event:

    sym.getSymbol("space_shuttle").$("Spaceshuttlelift-off") [0] .play ("enter");

    There's no label "enter" for the audio element. It should be:

    sym.getSymbol("space_shuttle").$("Spaceshuttlelift-off") [0] .play ();

    The biggest problem is in the mouseleave event:

    sym.getSymbol("space_shuttle").$("Spaceshuttlelift-off") [0] .stop ("exit");

    The audio element is not a stop method. You must use the break and with no label in there, like this:

    sym.getSymbol("space_shuttle").$("Spaceshuttlelift-off") [0] () .pause;

    HTH,

    Joe

  • Stop the sound at the click of the mouse in Actionscript 3

    So I have this code, I want the sound to stop when I click on the Start button, but when I click on the Start button, the sound does not, but its volume is decreased, it's very weird. If anyone can solve this?

    var mySound:Sound = new Sound();

    mySound.load(new URLRequest("Sounds/Sound.mp3"));

    var channel:SoundChannel = mySound.play();

    channel = mySound.play();

    StartButton.addEventListener(MouseEvent.CLICK, StartGame);

    function StartGame(e:MouseEvent):void {

    channel.stop();

    gotoAndPlay(2);

    }

    The code that show you should not have any effect on the volume change.  I don't know what happens after the call to the play() twice method however.

    Try to change these two lines so that you only call the play() immediately method...

    channel: var SoundChannel = new SoundChannel();

    Channel = mySound.play ();

  • Help: How can I stop the sound when I go out of the frame?

    How to stop a puppetsound when I go to another frame.

    I created a button and attached the script below to play the sound

    on mousedown

    puppetsound "the abc song".

    end

    but I want the music to stop when I'm out of the frame

    at the moment when the music is still playing when I get out of the frame.

    any help

    thanx

    You are almost correct. However, I don't think you want to reply to a #exitFrame message and stop your sound (depending on where you have the related code). Instead, use the #endSprite message (issued when the playback head leaves the span of a sprite in the score):

    on mouseDown me

    Sound (5) .play (member ("the abc song"))

    end

    on endSprite me

    Sound (5). Stop()

    end

  • stop the sound with the action script?

    Hello

    Im a beginner with action script, and is there a way to stop a sound using actionscript?

    My sound is called "CRICKET.mp3", if it is necessary to know.

    You can still use:

    SoundMixer.stopAll ();

    to stop all sounds.  but, if you want to stop a particular sound, you must apply stop() to soundchannel your sound (created when the play() method is applied to your sound).

  • Stop the sound from the external SWF

    Here's my problem. I have a main.swf and I load an external audio player.swf. I need to stop the player.swf sound when I press a button on the main.swf. Not all the buttons just a few buttons. I have now, I have to put the code in each button. Thank you

    have you tried stopAllSounds()

  • How can I stop the sound of reading back to me, when the voice recording

    How can I stop the replay to me a second after that I recorded (audio narration). First 14 elements?

    Roger

    I think that perhaps this is the only option, Bob. I couldn't find another way.

    Unfortunately, if you are wearing your headphones and listen to the audio of the film, when you save, you will hear the echo too.

    It's just the way it works and there is no way to stop doing that I know.

  • stop the sound alert for new email

    the alert stops other his webinar

    Firefox does not have email, nor does Firefox have a new email.

    Have you installed an add-on for alerts of webmail?

    You have this problem when running in Firefox SafeMode?

    http://support.Mozilla.com/en-us/KB/safe+mode

    Do not choose anything at the moment, just use 'continue in safe mode.

    When in Safe Mode...

    • The State of plugins is not affected.
    • Custom preferences are not affected.
    • All extensions are disabled.
    • The default theme is used, without a character.
    • userChrome.css and userContent.css are ignored.
    • The layout of the default toolbar is used.
    • The JIT Javascript compiler is disabled.
    • Hardware acceleration is disabled.

    If this is not the case, see this:

    https://support.Mozilla.org/en-us/KB/troubleshoot-extensions-themes-to-fi...

  • When I open a browser, I get a talker telling me which site I opened it. I want to stop this feature without stopping the sound, I need to watch other TV or YouTube

    When I have multiple windows, I click on a site and a computerized voice will tell me what is the Web site. It's like if everything I do receives a voice of Firefox. I want to disable this aspect without causing any problem when I really need sound like to watch shows on television. Every time I put the cursor on anything she will tell me what I'm doing what I don't need.

    Hi elamothe! Looks like you have just VoiceOver enabled for your Mac. You can find VoiceOver by going to System-> Universal Access-> see Preferences on your Mac, not in Firefox. This will allow you to disable VoiceOver.

    CMD + F5 to switch the setting as well.

    Hope this helps!

  • I can't stop the sound when SMS on my iPhone 6s he announced most of the words or its customers their advance all by announcing

    I can't stop my 6 s iPhone to announce the words as I SMS them

    Turn off the OPTION in

    Settings > general > accessibility > VoiceOver

Maybe you are looking for

  • Not enough space on iCloud

    Hi, I have 10 GB of photos on my iPhone and 5GB of free space on iCloud. I don't want to buy more storage on iCloud, but I would use this 5 GB I have. So, I was wondering if there is a way to choose which photos are uploaded to iCloud?

  • 10 windows on Thinkpad 10 no touchscreen or pen

    I have upgraded to Windows 10 and now my touch screen and stylus don't work. Device Manager says the devices are not connected to the system and there is an error on the Intel Serial I2C i/o controller indicating the I/O device is not configured prop

  • An application not valid Windows CE

    I have this GPS 400 Rightway old unit that has been modified to allow access to the office of its Windows CE 5.0 OS. I thought it's very good! I can install VLC or something and use it as a Mp3/mp4 player. but nothing is installed, same websites that

  • Surround sound cut during the game Mass Effect 2 on Windows 7 x 64 bit

    Original title: Surround sound cut while in games I gathered all my own office. Here are a few basic requirements. Procoessor: AMD Phenom II 955 3.2x4 Motherboard: Asus M4A77T/USB 3.0 Graphics card: Nvidia GTX 460 8 GB ram Here's my problem: My surro

  • Intel RST 15.2.0.1020 removes the ability to see or select the two disks in SSD Dashboard 1.4.3

    Save yourself some headaches if your RAID with Intel RST race of 10 to win... Installed Intel Rapid Storage Technology 15.2.0.1020 technology application & driver. Readers SanDisk Extreme Pro 240 GB SanDisk SSD Dashboard 1.4.3 lost to see and choose