⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 midi3.html

📁 java脚本即用特效源码从入门到精通帮你渡过难关
💻 HTML
字号:
<html>
<!-- 安装 Midi点播机 的几个步骤:

  1.  把以下数据复制到你的Html文件的Head标记下
  2.  把以下数据复制到你的Html文件的Html标记内
  3.  在Body标记加上OnLoad语句
  4.  然后把最后一部分加到Body标记内  -->

<!-- 步骤一: 把以下数据复制到你的Html文件的Head标记下  -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<script language="JavaScript">
<!--
function MM_timelinePlay(tmLnName, myID) { //v1.2
  //Copyright 1997 Macromedia, Inc. All rights reserved.
  var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
  if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time

  tmLn = document.MM_Time[tmLnName];
  if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
  if (myID == tmLn.ID) { //if Im newest
    setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
    fNew = ++tmLn.curFrame;
    for (i=0; i<tmLn.length; i++) {
      sprite = tmLn[i];
      if (sprite.charAt(0) == 's') {
        if (sprite.obj) {
          numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
          if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range
            keyFrm=1;
            for (j=0; j<sprite.values.length; j++) {
              props = sprite.values[j]; 
              if (numKeyFr != props.length) {
                if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
                else        sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
              } else {
                while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
                if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
                  if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
                  else        sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
        } } } } }
      } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
      if (fNew > tmLn.lastFrame) tmLn.ID = 0;
  } }
}

function MM_initTimelines() { //v4.0
    //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
    var ns = navigator.appName == "Netscape";
    var ns4 = (ns && parseInt(navigator.appVersion) == 4);
    var ns5 = (ns && parseInt(navigator.appVersion) > 4);
    document.MM_Time = new Array(1);
    document.MM_Time[0] = new Array(1);
    document.MM_Time["Timeline1"] = document.MM_Time[0];
    document.MM_Time[0].MM_Name = "Timeline1";
    document.MM_Time[0].fps = 15;
    document.MM_Time[0][0] = new String("sprite");
    document.MM_Time[0][0].slot = 1;
    if (ns4)
        document.MM_Time[0][0].obj = document["Layer2"];
    else if (ns5)
        document.MM_Time[0][0].obj = document.getElementById("Layer2");
    else
        document.MM_Time[0][0].obj = document.all ? document.all["Layer2"] : null;
    document.MM_Time[0][0].keyFrames = new Array(1, 26);
    document.MM_Time[0][0].values = new Array(3);
    if (ns5)
        document.MM_Time[0][0].values[0] = new Array("462px", "462px", "462px", "462px", "462px", "462px", "462px", "462px", "462px", "462px", "462px", "462px", "462px", "463px", "463px", "463px", "463px", "463px", "463px", "463px", "463px", "463px", "463px", "463px", "463px", "463px");
    else
        document.MM_Time[0][0].values[0] = new Array(462,462,462,462,462,462,462,462,462,462,462,462,462,463,463,463,463,463,463,463,463,463,463,463,463,463);
    document.MM_Time[0][0].values[0].prop = "left";
    if (ns5)
        document.MM_Time[0][0].values[1] = new Array("7px", "12px", "16px", "21px", "25px", "30px", "34px", "39px", "43px", "48px", "53px", "57px", "62px", "66px", "71px", "75px", "80px", "85px", "89px", "94px", "98px", "103px", "107px", "112px", "116px", "121px");
    else
        document.MM_Time[0][0].values[1] = new Array(7,12,16,21,25,30,34,39,43,48,53,57,62,66,71,75,80,85,89,94,98,103,107,112,116,121);
    document.MM_Time[0][0].values[1].prop = "top";
    if (!ns4) {
        document.MM_Time[0][0].values[0].prop2 = "style";
        document.MM_Time[0][0].values[1].prop2 = "style";
    }
    document.MM_Time[0][0].values[2] = new Array("inherit","inherit");
    document.MM_Time[0][0].values[2].prop = "visibility";
    if (!ns4)
        document.MM_Time[0][0].values[2].prop2 = "style";
    document.MM_Time[0].lastFrame = 26;
    for (i=0; i<document.MM_Time.length; i++) {
        document.MM_Time[i].ID = null;
        document.MM_Time[i].curFrame = 0;
        document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
    }
}
//-->
</script>
</head>

<!-- 步骤二: 把以下数据复制到你的Html文件的html标记内  -->
<script Language="JavaScript">
<!-- Hiding 
song = new Array()
var x = 0

song[1] = "曲目1"
song[2] = "曲目2"
song[3] = "曲目3"
song[4] = "曲目4"
song[5] = "曲目5"
song[6] = "曲目6"

function prev(){
if (x>1)
{ x--
document.midi.typein.value=song [x]
}
}

function next(){
var max= song.length-1
if (x<max)
{ x++
document.midi.typein.value=song [x]
}
}

function go(){
if (x != 0){
location.href='song'+x+'.mid'
}
}

function start(){
x=1
document.midi.typein.value=song [x]
}

function end(){
x=song.length-1
document.midi.typein.value=song [x]
}

function cls(){
document.midi.typein.value="选曲"
}
// Done Hiding -->
</script>

<!-- 步骤三: 在Body标记加上OnLoad语句  -->
<body Bgcolor="#ffffff" onload="cls();MM_timelinePlay('Timeline1')" topmargin="0">


<!-- 步骤四: 然后把最后一部分加到Body标记内  -->
<center>Midi点播机——真的非常酷</center> 
 
<div id="Layer2" style="position:absolute; width:270px; height:95px; z-index:2; left: 462px; top: 7px;">  
  <form name="midi"> 
    <input name="typein" class="pt9" type="text" size="25" align="top"> 
    <br> 
    <!-- You can change the size of the textbox if you need--> <font size="3">  
    <input type="Button" value="|&lt;&lt;" align="left" onClick="start()" name="Button"> 
    <input type="Button" value="&lt;&lt;" align="left" onClick="prev()" name="Button"> 
    <input type="Button" value="PLAY" align="left" onClick="go()" name="Button"> 
    <input type="Button" value="&gt;&gt;" align="left" onClick="next()" name="Button"> 
    <input type="Button" value="&gt;&gt;|" align="left" onClick="end()" name="Button"> 
    </font>  
  </form> 
</div> 
 
</body> 
</html> 
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -