Tulisan Mengikuti Mouse

blogger templates
1. login ke account blogger anda
2. masuk ke tata letak > elemen halaman > tambah gadget > pilih html/java script
3. masukan script berikut

<script>
//mouse
//Circling text trail- Tim Tilton
//Website: http://www.tempermedia.com/
//Visit http://www.dynamicdrive.com for this script and more
function cursor_text_circleundefined){
// your message here
var msg='MELKI PUTRA'.splitundefined'').reverseundefined).joinundefined'');

var font='Times New Roman';
var size=3; // up to seven
var color='#ff0000';

// This is not the rotation speed, its the reaction speed, keep low!
// Set this to 1 for just plain rotation w/out drag
var speed=.2;

// This is the rotation speed, set it negative if you want
// it to spin clockwise
var rotation=-.2;

// Alter no variables past here!, unless you are good
//---------------------------------------------------


var ns=undefineddocument.layers);
var ie=undefineddocument.all);
var dom=document.getElementById;
msg=msg.splitundefined'');
var n=msg.length;
var a=size*13;
var currStep=0;
var ymouse=0;
var xmouse=0;
var props="<font face="+font+" color="+color+" size="+size+">";

if undefinedie)
window.pageYOffset=0

// writes the message
if undefinedns){
for undefinedi=0; i < n; i++)
document.writeundefined'<layer left="0" top="0" width="+a+" name="nsmsg'+i+'" height="+a+"><center>'+props+msg[i]+'</font></center></layer>');
}
else if undefinedie||dom){
document.writeundefined'<div id="outer" style="position:absolute;top:0px;left:0px;z-index:30000;"><div style="position:relative">');
for undefinedi=0; i < n; i++)
document.writeundefined'<div id="iemsg'+undefineddom&&!ie? i:'')+'" style="position:absolute;top:0px;left:0;height:'+a+'px;width:'+a+'px;text-align:center;font-weight:normal;cursor:default">'+props+msg[i]+'</font></div>');
document.writeundefined'</div></div>');
}
undefinedns)?window.captureEventsundefinedEvent.MOUSEMOVE):0;

function Mouseundefinedevnt){
ymouse = undefinedns||undefineddom&&!ie))?evnt.pageY+20-undefinedwindow.pageYOffset):event.y; // y-position
xmouse = undefinedns||undefineddom&&!ie))?evnt.pageX+20:event.x-20; // x-position
}

if undefinedns||ie||dom)
undefinedns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
var y=new Arrayundefined);
var x=new Arrayundefined);
var Y=new Arrayundefined);
var X=new Arrayundefined);
for undefinedi=0; i < n; i++){
y[i]=0;
x[i]=0;
Y[i]=0;
X[i]=0;
}

var iecompattest=functionundefined){
return undefineddocument.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

var makecircle=functionundefined){ // rotation properties
if undefinedie) outer.style.top=iecompattestundefined).scrollTop+'px';
currStep-=rotation;
for undefinedi=0; i < n; i++){ // makes the circle
var d=undefinedns)?document.layers['nsmsg'+i]:ie? iemsg[i].style:document.getElementByIdundefined'iemsg'+i).style;
d.top=y[i]+a*Math.sinundefinedundefinedcurrStep+i*1)/3.8)+window.pageYOffset-15+undefinedie||dom? 'px' : '');
d.left=x[i]+a*Math.cosundefinedundefinedcurrStep+i*1)/3.8)*2+undefinedie||dom? 'px' : ''); // remove *2 for just a plain circle, not oval
}
}

var drag=functionundefined){ // makes the resistance
y[0]=Math.roundundefinedY[0]+=undefinedundefinedymouse)-Y[0])*speed);
x[0]=Math.roundundefinedX[0]+=undefinedundefinedxmouse)-X[0])*speed);
for undefinedvar i=1; i < n; i++){
y[i]=Math.roundundefinedY[i]+=undefinedy[i-1]-Y[i])*speed);
x[i]=Math.roundundefinedX[i]+=undefinedx[i-1]-X[i])*speed);

}
makecircleundefined);
// not rotation speed, leave at zero
setTimeoutundefinedfunctionundefined){dragundefined);},10);
}
if undefinedns||ie||dom)
if undefined typeof window.addEventListener != "undefined" )
window.addEventListenerundefined "load", drag, false );
else if undefined typeof window.attachEvent != "undefined" )
window.attachEventundefined "onload", drag );
else {
if undefined window.onload != null ) {
var oldOnload = window.onload;
window.onload = function undefined e ) {
oldOnloadundefined e );
dragundefined);
};
}
else
window.onload = drag;
}

}
cursor_text_circleundefined);

</script>
ganti tulisan yang berwarna merah tebal dengan tulisn yang diinginkan

0 Response to "Tulisan Mengikuti Mouse"

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Pages

About Me

My Photo
MELKI PUTRA
Teluk kuantan, RIAU, Indonesia
View my complete profile