Skip to main content
Participant
March 21, 2018
Answered

embedded videos continue playing

  • March 21, 2018
  • 1 reply
  • 161 views

Hey guys,

Im trying to make a project that basically a series of embedded videos in autoscript 3.0 that together form a short presentation. In between these embedded video, i have a pause and Im looking to use a keypress that would proceed to the next video clip. In short, I'm trying to make a glorified PowerPoint.

So far I have all my embedded video in a row on the timeline with the following actions:

stop();

stage.addEventListener(KeyboardEvent.KEY_DOWN, advance);
function advance(event:KeyboardEvent):void
{
trace("advance");
if (event.keyCode == 32)
{
  play();
}
}

and everything is working well however if i push the spacebar to advance to the next video, I still hear the audio of the first video in the background so i assume it is playing in the background. how can i fix this?

thanks!

    This topic has been closed for replies.
    Correct answer Colin Holgate

    If you add the first of these lines at the top, and the second one just before your 'play()' line, it should stop all sounds:

    import flash.media.SoundMixer;

    SoundMixer.stopAll();

    1 reply

    Colin Holgate
    Colin HolgateCorrect answer
    Inspiring
    March 21, 2018

    If you add the first of these lines at the top, and the second one just before your 'play()' line, it should stop all sounds:

    import flash.media.SoundMixer;

    SoundMixer.stopAll();