Sound loop do not repeat

So, I downloaded a simple sound loop of the Flash Kit.

I'm building a Flash site and want to sound in a loop once loads of film.  I added a stop and the movie button, in the case where the spectator is not the sound on.  I understand sound can be annoying.

I add the following code to the IMAGE 1 of the movie.  Everything works fine, but once the loop is completed, it just stops.  How to continue a loop?  Also, as I navigate to other sections of the film... I want to keep playing and does not restart when I return to say "home".  Home starts as well the frame 1.

Here is the code that I found:

/ code below sound control - external mp3 file.

var music: Sound = new Sound (new URLRequest ("thebeat.mp3"));

var sc:SoundChannel = music.play ();

var isPlaying:Boolean = true;

stop_btn.addEventListener (MouseEvent.CLICK, stopMusic);

function stopMusic(e:Event):void

{

sc.stop ();

isPlaying = false;

}

play_btn.addEventListener (MouseEvent.CLICK, playMusic);

function playMusic(e:Event):void

{

if (! isPlaying)

{

sc = music.play ();

isPlaying = true;

}

}

isPlaying is declared a Boolean value in the beginning before isPlaying is tested in the if statement and before it has a value (true or false).  When you test a boolean unassigned, it is resolved to false: trace (isPlaying)

if(!isPlaying);  tests! isPlaying = negation of isPlaying resolves to true when isPlaying is false

You then set isPlaying = true so repeated tests of! isPlaying will resolve to false.

Tags: Adobe Animate

Similar Questions

  • Portege R500 - error message "sound device is not supported" THotkey

    Hello

    Whenever I have start up my Portege R500 I get THotkey message error "sound device is not supported. \
    The same error message repeats when I touch the volume icon. There is also no sound.

    Any idea what causes this? I have tried to uninstall and reinstall the driver most that can affect the shortcut key and the sound.

    Thank you

    Nico

    Is it Vista or XP?

    Have you installed Windows yourself or it was preinstalled?

    Maybe the wrong driver was installed (of another model for example).

  • Random music DON'T work for my iPhone6. He repeats the same BLOODY song. I wanted to mix! Do not repeat!

    Shuffle IS NOT working for my iPhone6 with iOS9.2! Randomly, he selects a song and repeats the same BLOODY song. I wanted to mix! Do not repeat! ***?

    Does anyone else have this annoying problem?

    Hi LoreZyra,

    It sounds as if, in addition to mix music, you have the repeat function enabled on the now playing screen. The information described below detail how to access the current playback screen and repeat off.

    Control playback. Tap a song to play and show the Miniplayer. Tap the Miniplayer to display the now playing screen, where you can do the following:

    Repeat steps. Press on to repeat an album or a playlist. Double click to repeat one piece.

    iPhone user Guide - play music

    http://help.Apple.com/iPhone/9/

    Sincerely

  • Black screen of death and the sound loops

    Hello

    When I play a normal game on my cmoputer, I get a black screen and the sound loops always after 3 or 4 seconds. The computer crashes so I have to press the restart.

    After restarting the computer 10 times I fianley get an error on startup screen.
    I get this as information

    Probleemhandtekening:

    Clean van Gebeurtenisnaam: BlueScreen

    Versie van besturingssysteem: 6.1.7600.2.2.0.256.1

    Landinstelling-id: 1043

    Aanvullende information on clean says:

    BCCode: 333

    BCP1: 00000001

    BCP2: 00000002

    BCP3: 00000003

    BCP4: 00000004

    OS version: 6_1_7600

    Service Pack: 2_0

    Product: 256_1

    Bestanden die helpen bij het beschrijven van het clean:

    C:\Windows\Minidump\012710-20560-01.dmp

    C:\Users\Dennis\AppData\Local\Temp\WER-29640-0.SysData.XML

    Maybe you can help me please?  I think that the computer is hot? but I have an extra fan on the computer and the temparture is now 35 decrease.

    What can I do

    Greetz dennis

    does not not comodo firewall are you? It was originally my black screens, I disabled the firewall and defense ++ and everything worked fine since, and then they released a set day and difficulty for her.

  • audio loop will not stop

    I was setting up a videoconference application and ran an audio test. This leads to a sound loop that persists even though I turned off the computer, wait 10 minutes and turn. The loop continues to run. Help.

    I would start by stop the program to start automatically at startup.  Then she, at least, will stop making noise when you restart.  To do this, run the command MSCONFIG and disable this program on the Startup tab.

    Unfortunately I can't reach the site kaiser.org, so I can't try the software myself.  Still unknown, is that they do not appear in Google results.  So the best I can suggest (other than to stop doing that to start/restart) is to contact them and see if they have a patch to fix the problem.

  • is their an order for a loop. something like sym.loop("") or this. Sound.Loop(""). I especially need this

    is their an order for a loop. something like sym.loop("") or this. Sound.Loop(""). I especially need for two work to complete an audio file.

    Thank you.

    Hey, sabermaster -.

    Not at the moment, but you can create your own effects loop using triggers on the timeline.  What specific features do you want?

    -Elaine

  • Sound loop

    Hi all

    I discovered a problem when I was creating a sound loop in Flash. I am using a similar code (here is a short version):

    var sound: Sound = null; It is initialized then not shown here

    var pausePos:Number = 0;     the time at which the noise has been stopped and must be restarted again

    Run sound paused

    function playSound()

    {

    If (Bo! = null)

    {

    Soundtrack.Start (pausePos, 99999); looping sound

    }

    }

    pause the sound and store time

    function pauseSound()

    {

    If (Bo! = null)

    {

    pausePos = soundtrack.position;

    Soundtrack.Stop ();

    }

    }

    On the stage is a button play/pause the sound. The problem is that when the sound is paused and then not again suspended, a loop is executed since the time stored "pausePos". Not only it starts for the first time in the era of "pausePos", but the loop is to the 'pausePos' at the end of his time.

    How can I solve this problem? The ins Manager onSoundComplete't the solution, because then there is a short delay. Any ideas?

    Thank you

    Michal

    you will need to use the full sound event to complete your sound, then.  You can remove the trailing white space in an editor of sounds and derivation of white space using the offset parameter.

  • A sound loop

    Hi all..

    Can anyone help me please with a sound loop? I have this code, that is suppoused to make loop, but it does not work thank you very much advance!

    var req:URLRequest = new URLRequest ("squeeak.mp3");
    var sound: Sound = new Sound();
    var controller: SoundChannel;

    var b:Boolean;

    {if(!b)}
    b = true;

    function soundLoaded(event:Event):void
    {
    controller = sound.play().

    play_btn.addEventListener (MouseEvent.CLICK, playSound);
    stop_btn.addEventListener (MouseEvent.CLICK, stopSound);
    }

    function playSound(event:MouseEvent):void
    {
    controller = sound.play (0, int.) MAX_VALUE);
    }

    function stopSound(event:MouseEvent):void
    {
    Controller.Stop ();
    }

    sound.addEventListener (Event.COMPLETE, soundLoaded);
    Sound.load() (req);

    }

    This loop for me.

    var req:URLRequest = new URLRequest ("1.mp3");
    var sound: Sound = new Sound();
    controller: SoundChannel var = new SoundChannel();    //<-- did="">

    var b:Boolean;

    if(!b)
    {
    b = true;

    function soundLoaded(event:Event):void
    {
    controller = sound.play (0,1000);   //<-- and="">

    play_btn.addEventListener (MouseEvent.CLICK, playSound);
    stop_btn.addEventListener (MouseEvent.CLICK, stopSound);
    }

    function playSound(event:MouseEvent):void
    {
    controller = sound.play().
    }

    function stopSound(event:MouseEvent):void
    {
    Controller.Stop ();
    }
    sound.addEventListener (Event.COMPLETE, soundLoaded);
    Sound.load() (req);

    }

    Try it.

    Best regards

    Peter

  • Sound loop with a button

    So I used the tutorial on this page to make a button that turns the sound on and off (it's the only one I could find that actually works):

    [URL ="' http://www.entheosweb.com/Flash/flash_sound_button.asp ' ]

    But the only problem is that the sound does not loop. I found scripts that make loop sounds, but I don't know where to put in this code.

    PLEASE HELP ME! It was supposed to be done last week, and I do not tell the client that I don't know how to make his sound loop!

    Please tell me how to insert it into this code, because I don't want to make a button of his brand new. Thank you!

    The film that you have accessed to stop only the sound that is played. More than the sound is set to loop only 7 times, so it stops after a little more than a minute in all cases.

    Take a look at this variation that I built using the existing content. It is much simpler and does what you want: http://www.ddg-designs.com/downloads/soundControl.zip

  • Satellite 5000 with Windows XP, Service Pack 1 is installed and now my sound card does not work

    Everyone knows this problem.

    I have a 5000 Satellite with Windows XP. I installed SP1 and now my sound card does not work.

    Any ideas out there?

    Does anyone have this problem?

    I reinstalled the Yamaha drive a couple of times and always the same: no sound?

    I bought this unit in Holland and it was great until the problem of Service Pack. I heard that Comcom was a dealer right here. Maybe I'll have to make to them, if I can't help here?

  • Sound card does not work after upgrade to XP Pro

    I need help - Microsoft participated three times without result. After that I updated to XP pro that my SigmaTel C Major sound card does not work. Done all the usual uninstall the driver, update driver etc. No results. When I go into the properties of audio devices, midi and mixer IE driver I see a status message: active but device not started

    Any ideas on how to solve it is greatly appreciated.

    Hello

    Sorry but I have no explanation for this. I can recommend you to remove the sound card in Device Manager, then restart the unit. After reboot, the sound card must be recognized and installed properly.

    It will be interesting to know what model of laptop you have.

  • Tecra 9100: sound card is not listed in Device Manager

    Hello
    I have a toshiba laptop 9100 that does not show me the sound card in Device Manager.

    I recently changed the laptop bobdy and uses a disk hard work that work very well with my old laptop which also has the same model and the sound used to work properly with this one. but since I changed my laptop, the sound just does not.

    I also tried to install all the latest drivers that I am running windows xp sp2, and there are drivers available who have a difficulty for this os. But when I try and install the drivers it always ends with a message warning "drivers are not installed.

    I tried to see if there is another way in which I can configure my sound, but it simply doesn't.

    Help, please!

    thanx

    Peppy

    [Edited by: admin August 6 05 08:52]

    Hello peppy

    If the sound card is not listed in Device Manager, the explanation is very simple. The card its doesn't exist for the operating system. Either card defective or not connected properly.

    Contact the Service partner and let check the device. Sorry, but in this case I put t see another solution.

    BR

  • K3 Note sound camera is not turning off after update of Marshmallow

    After the update of the marshmallow sound camera my k3 note Sutter's not turn off... Even in silent mode, it sounds very strong.
    Someone knows how to turn off the sound.

    Note from the admin; phone added to the subject type

    When using your camera, simply turn on the option of DND and the shutter sound will be silent.

  • Sound card is not verified with XP on Satellite A100-784

    When I try to install the driver it says that this sound card is not verified with xp
    end it is said

    State of the device: this device cannot start (code 10)

    PIC without device
    http://img124.imageshack.us/img124/1551/capturewiznr8.jpg
    Help, please

    How did you install the operating system on your laptop? Have you used the Toshiba Recovery CD?
    Did you use the right audio driver?

  • How one does sound loops on a track to create a song?

    I am new to apple.  I would like to know how to draw loops of sound on a track?  I chose the path and the instrument, now how to record sound? in my sony software you just draw on the road to a loop selected to place it on the right track and then read it.

    Wow, Sony must use a different concept based on your questions.

    I've never heard of a 'sound loop', don't know what that means.

    You or the other Records audio signals to an Audio track or MIDI signals from your MIDI keyboard on an Instrument track that creates regions. These area can be sealed off by dragging the upper right of the region.

    Then there are loops Apple Loops that you can access from the loop on the right browser. It is MIDI and Audio regions following the tempo (and pitch) of you project.

    It is always harder to relearn software (from another brand) that learning new software. I would like advice with a peak in the manual once a while to understand how different from what you are accustomed to Sony GarageBand.

Maybe you are looking for