在网页中用RealPlayer 控件播放电影,javascript怎样用 RealPlayer 事件来知道电影已播放完毕?

解决方案 »

  1.   

    <OBJECT   ID=player   CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"       WIDTH=320   HEIGHT=240><PARAM   NAME="SRC"   VALUE="http://djmusic.hahadj.com/dj00/zw/51/16.rm"><param   name=CONTROLS   vlaue=all></OBJECT>   
      <script   for=player   event=OnPlayStateChange(newstate)>if(newstate   ==   0)location.href="qidizi.html";</script>   
        
        
      OnPlayStateChange     
      Sent   when   the   play   state   of   the   presentation   in   RealPlayer   changes.     
        
      OnPlayStateChange(int32   old_state,   int32   new_state)   
        
          
        
        Warning!   When   programming   an   ActiveX   control,   the   old_state   parameter   is   not   available.   The   proper   syntax   is:   
      OnPlayStateChange(int32   new_state).   If   your   ActiveX   application   requires   both   the   old_state   and   new_state   parameters,   use   the   OnStateChange   callback   instead.       
        
        
      old_state     
      The   previous   play   state.     
        
      new_state     
      The   current   play   state.   
        
      The   following   table   lists   the   possible   values   for   the   old_state   and   new_state   parameters:     
        
        
      Parameter   Values   for   the   Possible   Play   States     Parameter   Value   Play   State     
      0   Stopped     
      1   Contacting     
      2   Buffering     
      3   Playing     
      4   Seeking     
        
        
      Returns   void