Skip to main content
Participant
August 5, 2011
Answered

FLVPlayer stop when redirecting to another frame. AS3

  • August 5, 2011
  • 2 replies
  • 573 views

Hi

I am new in AS3, but now i have problem to stop plaing FLVPlayback.

In main time line i have first frame used for preloader and second for intro.

Frame 3 is first screen with videoand my MainMenu with buttons inside mc.

Now when I click on button it successfully redirect screen to next frame and load my page, but I still hear music from video.

I need to stop playing video when i redirect to frames 4, 5 ....28 where are pages frame by frame.

In MainMenu i use

import flash.events.MouseEvent;
import flash.display.MovieClip;

//menu Domov
function btnHome(event:MouseEvent):void
{
    (root as MovieClip).gotoAndPlay(4);
}
function btnOnas(event:MouseEvent):void
{
    (root as MovieClip).gotoAndPlay(5);
}
function btnBoard(event:MouseEvent):void
{
    (root as MovieClip).gotoAndPlay(6);
}


btnHome_btn.addEventListener (MouseEvent.CLICK, btnHome);
btnOnas_btn.addEventListener (MouseEvent.CLICK, btnOnas);
btnBoard_btn.addEventListener (MouseEvent.CLICK, btnBoard);

website have 24 pages than i don't copy next buttons.

sorry for my english.

This topic has been closed for replies.
Correct answer

First include the SoundMixer class:

import flash.media.SoundMixer;

Then to stop the sounds call the stopAll method:

SoundMixer.stopAll();

2 replies

mase9132Author
Participant
August 6, 2011

Thx alot thats work fine now.

Correct answer
August 6, 2011

First include the SoundMixer class:

import flash.media.SoundMixer;

Then to stop the sounds call the stopAll method:

SoundMixer.stopAll();