to:raeck (门框) 
我的进度条已经写好了

解决方案 »

  1.   

    可能还有点bugs.你自己调调吧.基本的功能已经实现了
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <OBJECT ID="Player" height="200" width="200"
      CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
      <!--param name="uiMode" value="none"-->
      <param name="enabled" value="true">
      <param name="buffering" value="ture">
    </OBJECT><br>
    <INPUT TYPE="BUTTON" NAME="BtnPlay" VALUE="Play" OnClick="StartMeUp();bs(1)">
    <INPUT TYPE="BUTTON" NAME="BtnStop" VALUE="Stop" OnClick="ShutMeDown()">
    <input type="button" name="Btnshowtime" value="showtime" onclick="showtime();Get_position()"><!--input type="button" name="shwo_time" value="show_item" onclick="shwo_time()"-->
    <INPUT TYPE="file" NAME="Btnfile">
    <br>
    length:<input type=text name="myText">
    <INPUT TYPE=text NAME="myText2"><br>
    <table border="0" width="67%" cellspacing="0" cellpadding="0">
    <tr>
    <td id="position_button_box" width="100%" bgcolor="#C0C0C0">
    <input id="position_button" type="button" value="进度"  onmousedown="start_down()" onmousemove=" start_move()" onmouseup="start_up()" style="position: relative; left:0; height: 18; width: 32">
    </td>
    </tr>
    </table>
    <SCRIPT>
    <!--
    function show_item()
    {
        the_player=document.getElementById("Player");
        alert(the_player.currentMedia.imageSourceHeight);
    }function StartMeUp ()
    {
        Player.URL = Btnfile.value;
        return Player.URL;}function getURL()
    {
        var URL=Player.currentMedia.sourceURL;
        return URL;
    }function showtime()
    {
        var the_player=document.getElementById("Player");
        myText.value=the_player.currentMedia.duration;
    }function Get_length()
    {
       var the_player=document.getElementById("Player");
       return the_player.currentMedia.duration;
    }function Get_position()
    {
       var the_player=document.getElementById("Player");
       myText2.value=the_player.controls.currentPosition;
       return the_player.controls.currentPosition;
    }function ShutMeDown ()
    {
        Player.controls.stop();
    }
    function dos(){ position_button.style.pixelLeft=Math.round((position_button_box.offsetWidth-position_button.offsetWidth)*Get_position()/Get_length());
    }
    function bs(d){
    if(d)
    a=setInterval(dos,10)
    else clearInterval(a)
    }
    var Ox,Nx;
    var move_obj_can_move=0;
    var move_obj=0;function start_down(){
    Ox=event.clientX;
    move_obj_can_move=1;
    move_obj=event.srcElement.id;
    //alert(move_obj)
    document.getElementById(move_obj).setCapture();
    bs(0)
    }
    function start_move(){
    if(move_obj){
    Nx=event.clientX;
    var judger=document.getElementById(move_obj).style.pixelLeft+Nx-Ox;
    var max=document.getElementById(move_obj+"_box").offsetWidth-document.getElementById(move_obj).offsetWidth;
    if(move_obj_can_move&&move_obj&&judger<=max&&judger>=0){
    document.getElementById(move_obj).style.pixelLeft+=Nx-Ox;
    eval(move_obj+"_event("+document.getElementById(move_obj).style.pixelLeft+","+max+")");

    Ox=Nx;
    }
    }
    }
    function start_up(){
    if(move_obj){
    document.getElementById(move_obj).releaseCapture();
    move_obj_can_move=0;
    move_obj=0;
    bs(1)
    }
    }
    function position_button_event(s_num,b_num){
    document.getElementById("Player").controls.currentPosition=Math.round(Get_length()*s_num/b_num)
    }
    -->
    </SCRIPT>
    </BODY>
    </HTML>
      

  2.   

    进度条写好了??? 可以给我吗? 我的email是 [email protected] 不胜感谢