|
-
Stop file download in progress
Good afternoon,
I've built an online magazine, that has several links to videos. One page has four of them. They all work great except under one specific circumstance. If the user quickly opens a video, and closes it, moving on the to next, and doing the same, the 3rd or 4th video may appear unresponsive. I've narrowed this down to being a bandwith issue. If I look at my activiyt in Safari, the FLV files continue to download even if the user closes my player.
Is there anyway to kill this download if the user closes a player?
Here's my code calling a specific player and video:
Code:
function p6l1goto(e:MouseEvent):void // functioned called by my button
{
var videoPlayer_mc:introVideoMC = new introVideoMC; // MC in my library using the FLVplayback component
videoPlayer_mc.x = (stage.stageWidth /2) - 350;
videoPlayer_mc.y = (stage.stageHeight /2) - 225;
addChild(videoPlayer_mc);
videoPlayer_mc.theVideo.play(); // plays the actual FLV defined in the MC
p67links_mc.p6l1_btn.removeEventListener(MouseEvent.CLICK, p6l1goto);
videoPlayer_mc.closePlayer_btn.addEventListener(MouseEvent.CLICK, closeVideo);
function closeVideo(e:MouseEvent):void
{
videoPlayer_mc.closePlayer_btn.removeEventListener(MouseEvent.CLICK, closeVideo);
p67links_mc.p6l1_btn.addEventListener(MouseEvent.CLICK, p6l1goto);
videoPlayer_mc.theVideo.stop();
videoPlayer_mc.theVideo.autoRewind = true;
removeChild(videoPlayer_mc);
}
}
Works great unless you open/close in rapid successsion.
Thanks for looking!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|