• Resolved Lo?c Levêque

    (@luisobispo)


    Hello,

    I just would like to directly redirect the visitors after the end of a flash video.

    What code should I use for that?

    Thank you!

    [stop bumping your posts – it’s rude and against forum rules]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Lo?c Levêque

    (@luisobispo)

    Sorry. Apologies.

    Thread Starter Lo?c Levêque

    (@luisobispo)

    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 = ‘https://www.yourpage.com&#8217;;
    }
    };

    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘redirecting after flash video end?’ is closed to new replies.