Hi everyone,
I just wanted a redirection after a flash video end.
I just found a solution in Yahoo:
<script type=”text/javascript”>
var player = null;
var playlist = null;
function playerReady(obj)
{
player = gid(obj.id);
addListeners();
};
function addListeners()
{
playlist = player.getPlaylist();
if(playlist.length > 0)
{
player.addModelListener(‘STATE’, ‘stateMonitor’);
}
else
{
setTimeout(“addListeners();”, 100);
}
};
function stateMonitor(obj)
{
if(obj.newstate == ‘COMPLETED’)
{
//…load a new page when the media file completes playing
document.location = ‘http://www.yourpage.com’;
}
};
function gid(name)
{
return document.getElementById(name);
};
</script>
I just copied that in my header and it works.
I hope it can help someone else.
Have a nice day.
Hi
Can someone tell me where to copy this code, do I copy into the html tab when I’m creating a new post?
Thanks