Um script para fazer um figura seguir o mouse atendendo a pedidos... Insira este código entre as tags
<body></body> da sua página.
<script language="javascript">
function YY_Mousetrace(evnt) {
if (yyns4) {
if (evnt.pageX) {
yy_ml = evnt.pageX;
yy_mt = evnt.pageY;
}
} else{
yy_ml = (event.clientX + document.body.scrollLeft);
yy_mt = (event.clientY + document.body.scrollTop);
}
if (yy_tracescript) {
eval(yy_tracescript);
}
}
function YY_Layerfx(yyleft, yytop, yyfnx, yyfny, yydiv, yybilder, yyloop, yyto, yycnt, yystep) {
if ((document.layers) || (document.all)) {
eval("myfunc=yyfnx.replace(/x/gi, yycnt)");
with (Math) {
yynextx = eval(myfunc);
}
eval("myfunc=yyfny.replace(/x/gi, yycnt)");
with (Math) {
yynexty = eval(myfunc);
}
yycnt = (yyloop && yycnt >= (yystep * yybilder)) ? 0 : (yycnt + yystep);
if (document.layers) {
eval(yydiv + ".top=" + (yynexty + yytop));
eval(yydiv + ".left=" + (yynextx + yyleft));
}
if (document.all) {
eval("yydiv=yydiv.replace(/.layers/gi, '.all')");
eval(yydiv + ".style.pixelTop=" + (yynexty + yytop));
eval(yydiv + ".style.pixelLeft=" + (yynextx + yyleft));
}
argStr = 'YY_Layerfx(' + yyleft + ',' + yytop + ',"' + yyfnx + '","' + yyfny + '","' + yydiv + '", ' + yybilder + ',' + yyloop + ',' + yyto + ',' + yycnt + ',' + yystep + ')';
if (yycnt <= (yystep * yybilder)) {
eval(yydiv + ".yyto=setTimeout(argStr,yyto)");
}
}
}
var yyns4 = window.Event ? true : false;
var yy_mt = 0;
var yy_ml = 0;
if (yyns4) {
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = YY_Mousetrace;
yy_tracescript = '';
</script>
<div id="Orbita" style="position:absolute; left:475px; top:11px; width:36px; height:32px">
<img src="imagem.ext" border="0" />
</div>