Hi

Not sure if this will work, but here is the AS3 code I use to stop
both a video player and an mp3 player when the user leaves the page -
it's integrated into each button function (myVid and mp3Player are the
movieclip instance names):




///buttons

var thisMP3Player;

function aboutClick(e:Event):void
                {
                        if (myVid!=null) {
                                myVid.ns.close();
                        }
                                                removeMP3Player();
                        gotoAndPlay("ABOUT");
                }

function demoClick(e:Event):void
                {
                        if (myVid!=null) {
                                myVid.ns.close();
                        }
                                                removeMP3Player();
                        gotoAndPlay("DEMO");
                }

function videoClick(e:Event):void
                {
                        if (myVid!=null) {
                                myVid.ns.close();
                        }
                                                removeMP3Player();
                        gotoAndPlay("VIDEO");
                }


about.addEventListener(MouseEvent.CLICK,aboutClick);
demo.addEventListener(MouseEvent.CLICK,demoClick);
video.addEventListener(MouseEvent.CLICK,videoClick);


//remove mp3 player when leaving page

function removeMP3Player() {
        var loc1:*;
        var loc2:*;
        var loc3:*;
        trace(mp3Player);
        if (mp3Player!=null) {
                if (mp3Player.numChildren>1) {
                        loc1=mp3Player.getChildAt(0);
                        loc2=mp3Player.getChildAt(1);
                        loc3=mp3Player.getChildAt(2);
                        mp3Player.removeChild(loc1);
                        mp3Player.removeChild(loc2);
                        mp3Player.removeChild(loc3);
                        loc2._soundManager.pauseSound();
                }
        }
}







On Jan 23, 11:31 am, RIDGIDConnect <[email protected]> wrote:
> The player on our site continues to download a video even after
> leaving the page.This does not happen in Firefox.  It will stop
> downloading when the user specifically clicks stop.

-- 
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.

Reply via email to