I have been using some very excellent code by mimi which seems to have stopped working with the latest swfobject or player - not sure which.
mimi coded in this thread
and the code is below. Can anyone see what is wrong
http://www.mrsc.co.uk/flash/player.php
Fix this, make it work for me and post your email and I'll send you paypal $50 if you want - I'm in trouble
<script type="text/javascript">
var player = null;
var playlist = null;
var startFlag = true;
function playerReady(obj)
{
player = gid(obj.id);
addListeners();
};
function addListeners()
{
playlist = player.getPlaylist();
if(playlist !== null)
{
player.addModelListener('TIME', 'timeMonitor');
loopie();
}
else
{
setTimeout("addListeners()", 100);
}
};
function timeMonitor(obj)
{
if((obj.position > 0) && (!startFlag))
{
startFlag = true;
}
};
function loopie()
{
if(!startFlag)
{
player.sendEvent('PLAY', 'true');
setTimeout("loopie()", 5000);
}
};
function gid(name)
{
return document.getElementById(name);
};
</script>
