Please help! I've tried every example on this website to try to STOP a FLVplayer from playing a video. Here's what I'm doing: I've set up a player, but am not actually not actually started it ontil a user clicks on a button, which involkes the StartVid() function shown. There's a boolean so that the first time it's clicked, the actual player is written to the <DIV id>. That works fine. Next time that button is clicked, I want to stop the video and re-load the page. The STOP is needed because otherwise, it takes forever to re-load. The comments show all the things I've tried that don't work. In every case, my error console shows that the object doesn't support the method. What am I doing wrong?
var st = new SWFObject('bin/player.swf','ply','550','420','9','#33cc99');
st.addParam('allowfullscreen','true'); // global settings
var bPlayVid = 0;
if(bPlayVid == 0)
bPlayVid = 1; // first time
else // next time
var player = document.getElementById('vtLocation');
player.sendEvent("PLAY"); // doesn't work
st.sendEvent("PLAY"); // doesn't work either
player.sendEvent("STOP"); // doesn't workeither
player.sendEvent("PLAY", 'false'); // doesn't work either
location.reload(0); // don't ask... there's a good reason.