How can I stop one SWF file playing when playing another in a HTML page?
I currently have a carousel that displays multiple SWF files and I don't want any overlapping of video or audio. I've been looking into LocalConnection and JavaScript options but with no luck. My SWF files are currently ActionScript 3 and Flash Player 10. I have a large play button on them, with the ActionScript code:
import fl.video.VideoEvent;
import fl.video.VideoState;
video.addEventListener(VideoEvent.STATE_CHANGE,showButton);
playVideoButton.addEventListener(MouseEvent.MOUSE_UP,playVideo);
function playVideo(event:MouseEvent):void {
video.play();
playVideoButton.visible=false;
}
function showButton(event:VideoEvent):void {
switch (event.target.state) {
case "stopped" :
playVideoButton.visible=true;
break;
case "playing" :
playVideoButton.visible=false;
break;
case "paused" :
playVideoButton.visible=true;
break;
}
}
Is there a way to incoporate a "stop the other SWF files playing" in this somehow?