SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast Wouter's Avatar
    Join Date
    Jan 2002
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool How to call javascript when movie is finished?

    I have the following windows media player object integrated in a page. How to call a javascript action when the movie is finished?

    Thanks Wouter

    <object id="WMPlay" width=80 height=60
    classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
    codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715">


    <Param Name="FileName" Value="dummy.avi">
    <Param Name="Autostart" Value="true">
    <Param Name ="Loop" Value="false">

    <Param Name ="Href" Value="http://www.dummy.htm">
    <Param Name ="AutoRewind" Value="-1">
    </object>

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <SCRIPT FOR="mediaPlayer" EVENT="EndOfStream(lResult)" LANGUAGE="JScript">
        alert('Done');
        // Or do something more interesting :)
    </SCRIPT>
    (Change mediaPlayer to the ID of your media player object)

  3. #3
    SitePoint Enthusiast Wouter's Avatar
    Join Date
    Jan 2002
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks you a lot. It worked


    change FOR="mediaPlayer" into FOR="WMPlay" (WMPlay = id of the object)

    Regards & Fun, Wouter


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •