DHTML: A bird circling around the mouse (bird: Not Me)

Source: Internet
Author: User
Tags cos sin
A few interesting pieces of DHTML, it's fun, it's a by-product of a gobang.
How old is Mimi this year? I've been to so many places, it looks as if it's bigger than flying brother.
I am too lazy to pass the picture, originally I used the flapping wings of the little angel.
Now only Netscape 4 is supported, Ming Mingre to make ie. It's a little bird around the mouse.
<HTML>
<title> Bird </title>
<body bgcolor= "#505050" text= "#ffffff" link= "#e0e0e0" vlink= "#808080" alink= "#ffffff" >
<layer name= "A" left= "top=" visibility= "show" bgcolor= "#fffae2" clip= "0,0,50,50" >
</layer >
<script language= "JavaScript1.2" >
<!--
var useragent = navigator.appname + "" + navigator.appversion;
var agentinfo = useragent.substring (0, 12);
if (agentinfo >= "Netscape 4.0") {
Window.captureevents (Event.mousemove);
var ybase = WINDOW.INNERHEIGHT/2;
var xBase = WINDOW.INNERWIDTH/2;
var delay = 20;
var Yampl = 10;
var ymax = 40;
var step =. 2;
var ystep =. 5;
var currstep = 0;
var tampl=1;
var xpos = 10;
var Ypos = 10;
var j = 0;
function Movehandler (evnt) {
Xpos = Evnt.pagex;
Ypos = Evnt.pagey;
}
Window.onmousemove = Movehandler;
function Flybird () {
Ybase = WINDOW.INNERHEIGHT/4;
XBase = WINDOW.INNERWIDTH/4;
Document.layers[0].top = Ypos + Math.Cos ((Math.sin (Currstep/(+ j))) + J * Ybase * (Math.sin (10 + CURRSTEP/10) + 0.2) * Math.Cos ((currstep + J * 25)/10);
Document.layers[0].left =xpos + Math.sin ((Math.sin (CURRSTEP/20)) + J * XBase * (Math.sin + currstep /(+ j)) + 0.2) * Math.Cos (Currstep + J * 25)/10);
Currstep + = step;
SetTimeout ("Flybird ()", delay);
}
Flybird ()
}
-->
</script >
</body >

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.