JavaScript technology to achieve real online audition

Source: Internet
Author: User
The script features: layer technology that applies javascript, and some function () to enable the corresponding scrolling of the lyrics while playing the music.
Use Realplay RM format music to play the download at the same time.
(This special effect is valid for IE4 above.) )
Demonstrate:
<script language= "Javascript1.2" >
<!--
var locate = 0;
var scro = 0;
var go=80;//controls the speed of scrolling, the smaller the faster.
The following function implements scrolling
function Scroller () {
if (scro==1) {
locate++;
Scroll (20,locate);
Cleartimeout (timer);
var timer = settimeout ("Scroller ()", go);
Timer
}
else{

Scroll (20,locate);
}
}
-->
</SCRIPT>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title>welcome to Yi ' s home</title>
<body bgcolor= "#EEEEEE" >
<script language= "Javascript1.2" >
<!--
var offsettop=20//defines the corresponding position of the layer
Define layer functions that automatically scroll with Web pages
function Makestatic () {
object1.style.pixeltop=document.body.scrolltop+offsettop;object2.style.pixeltop=document.body.scrolltop+ offsettop;
SetTimeout ("makestatic ()", 100);//' 100 ' control the speed of scrolling, the smaller the faster.
}
Functions that toggle the ' scrolling ' and ' paused ' images
function SCRORSTP () {
if (scro==1)
{scro=0;
object2.style.visibility= "visible";
object1.style.visibility= "visible";
}
else {
Scro=1;
Object1.style.visibility= "hidden";
Scroller ();}
}
Define the song address to play
document.write (' <div id= "Object2" style= "Position:absolute; left:20px; top:35px; width:46px: Hand Z-index:1 "><font" "size=" 2 "><embed height= "src=" Afainst All Odds Mariah carey.rm "type=" Audio/x-pn-realaudio-plugin "width=" "controls=" Autostart= "false" ></font></div> ")

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.