PDA

View Full Version : » JAVASCRIPT Habbo mouse pointer for your website! [Made by me]



Highjacker-x
13-06-2007, 11:34 PM
Last night I was bored, So I decided to make a quick script.

Its a HABBO mouse pointer for your website.

All you gotta do is simply add this code after the <head> tags on your site.


<script language="JavaScript" type="text/javascript">
A=document.getElementById
B=document.all;
C=document.layers;
T1=new Array("http://www.bobbafm.pro-hosting.org.uk/MyMouseScript/pointer.png ",35,35)
var offsetx=0 //x offset of trail from mouse pointer
var offsety=0 //y offset of trail from mouse pointer
nos=parseInt(T1.length/3)
rate=50
ie5fix1=0;
ie5fix2=0;
rightedge=B? document.body.clientWidth-T1[1] : window.innerWidth-T1[1]-20
bottomedge=B? document.body.scrollTop+document.body.clientHeight-T1[2] : window.pageYOffset+window.innerHeight-T1[2]
for (i=0;i<nos;i++){
createContainer("CUR"+i,i*10,i*10,i*3+1,i*3+2,"","<img src='"+T1[i*3]+"' width="+T1[(i*3+1)]+" height="+T1[(i*3+2)]+" border=0>")
}
function createContainer(N,Xp,Yp,W,H,At,HT,Op,St){
with (document){
write((!A && !B) ? "<layer id='"+N+"' left="+Xp+" top="+Yp+" width="+W+" height="+H : "<div id='"+N+"'"+" style='position:absolute;left:"+Xp+"; top:"+Yp+"; width:"+W+"; height:"+H+"; ");
if(St){
if (C)
write(" style='");
write(St+";' ")
}
else write((A || B)?"'":"");
write((At)? At+">" : ">");
write((HT) ? HT : "");
if (!Op)
closeContainer(N)
}
}
function closeContainer(){
document.write((A || B)?"</div>":"</layer>")
}
function getXpos(N){
if (A)
return parseInt(document.getElementById(N).style.left)
else if (B)
return parseInt(B[N].style.left)
else
return C[N].left
}
function getYpos(N){
if (A)
return parseInt(document.getElementById(N).style.top)
else if (B)
return parseInt(B[N].style.top)
else
return C[N].top
}
function moveContainer(N,DX,DY){
c=(A)? document.getElementById(N).style : (B)? B[N].style : (C)? C[N] : "";
if (!B){
rightedge=window.innerWidth-T1[1]-20
bottomedge=window.pageYOffset+window.innerHeight-T1[2]
}
c.left=Math.min(rightedge, DX+offsetx);
c.top=Math.min(bottomedge, DY+offsety);
}
function cycle(){
//if (IE5)
if (document.all&&window.print){
ie5fix1=document.body.scrollLeft;
ie5fix2=document.body.scrollTop;
}
for (i=0;i<(nos-1);i++){
moveContainer("CUR"+i,getXpos("CUR"+(i+1)),getYpos("CUR"+(i+1)))
}
}
function newPos(e){
moveContainer("CUR"+(nos-1),(B)?event.clientX+ie5fix1:e.pageX+2,(B)?event.c lientY+ie5fix2:e.pageY+2)
}
function getedgesIE(){
rightedge=document.body.clientWidth-T1[1]
bottomedge=document.body.scrollHeight-T1[2]
}
if (B){
window.onload=getedgesIE
window.onresize=getedgesIE
}
if(document.layers)
document.captureEvents(Event.MOUSEMOVE)
document.onmousemove=newPos
setInterval("cycle()",rate)
</script>


My first ever script & Its a success

Enjoy people x

Moved by opensourcehost (Forum Moderator) from Web Designing: Please post in the correct forum next time, thanks :).

Mentor
13-06-2007, 11:47 PM
Last night I was bored, So I decided to make a quick script.

Its a HABBO mouse pointer for your website.

All you gotta do is simply add this code after the <head> tags on your site.


<script language="JavaScript" type="text/javascript">
A=document.getElementById
B=document.all;
C=document.layers;
T1=new Array("http://www.bobbafm.pro-hosting.org.uk/MyMouseScript/pointer.png ",35,35)
var offsetx=0 //x offset of trail from mouse pointer
var offsety=0 //y offset of trail from mouse pointer
nos=parseInt(T1.length/3)
rate=50
ie5fix1=0;
ie5fix2=0;
rightedge=B? document.body.clientWidth-T1[1] : window.innerWidth-T1[1]-20
bottomedge=B? document.body.scrollTop+document.body.clientHeight-T1[2] : window.pageYOffset+window.innerHeight-T1[2]
for (i=0;i<nos;i++){
createContainer("CUR"+i,i*10,i*10,i*3+1,i*3+2,"","<img src='"+T1[i*3]+"' width="+T1[(i*3+1)]+" height="+T1[(i*3+2)]+" border=0>")
}
function createContainer(N,Xp,Yp,W,H,At,HT,Op,St){
with (document){
write((!A && !B) ? "<layer id='"+N+"' left="+Xp+" top="+Yp+" width="+W+" height="+H : "<div id='"+N+"'"+" style='position:absolute;left:"+Xp+"; top:"+Yp+"; width:"+W+"; height:"+H+"; ");
if(St){
if (C)
write(" style='");
write(St+";' ")
}
else write((A || B)?"'":"");
write((At)? At+">" : ">");
write((HT) ? HT : "");
if (!Op)
closeContainer(N)
}
}
function closeContainer(){
document.write((A || B)?"</div>":"</layer>")
}
function getXpos(N){
if (A)
return parseInt(document.getElementById(N).style.left)
else if (B)
return parseInt(B[N].style.left)
else
return C[N].left
}
function getYpos(N){
if (A)
return parseInt(document.getElementById(N).style.top)
else if (B)
return parseInt(B[N].style.top)
else
return C[N].top
}
function moveContainer(N,DX,DY){
c=(A)? document.getElementById(N).style : (B)? B[N].style : (C)? C[N] : "";
if (!B){
rightedge=window.innerWidth-T1[1]-20
bottomedge=window.pageYOffset+window.innerHeight-T1[2]
}
c.left=Math.min(rightedge, DX+offsetx);
c.top=Math.min(bottomedge, DY+offsety);
}
function cycle(){
//if (IE5)
if (document.all&&window.print){
ie5fix1=document.body.scrollLeft;
ie5fix2=document.body.scrollTop;
}
for (i=0;i<(nos-1);i++){
moveContainer("CUR"+i,getXpos("CUR"+(i+1)),getYpos("CUR"+(i+1)))
}
}
function newPos(e){
moveContainer("CUR"+(nos-1),(B)?event.clientX+ie5fix1:e.pageX+2,(B)?event.c lientY+ie5fix2:e.pageY+2)
}
function getedgesIE(){
rightedge=document.body.clientWidth-T1[1]
bottomedge=document.body.scrollHeight-T1[2]
}
if (B){
window.onload=getedgesIE
window.onresize=getedgesIE
}
if(document.layers)
document.captureEvents(Event.MOUSEMOVE)
document.onmousemove=newPos
setInterval("cycle()",rate)
</script>


My first ever script & Its a success

Enjoy people x
For gods sake, if your gona be stupid enough to ripp someones script at least have the sence not to rip from Dynamic drive =.= Pretty much EVERYONE here knows the bloody site.

All youve done is remove the

/******************************************
* Cross browser cursor trailer script- By Brian Caputo ([email protected])
* Visit Dynamic Drive (http://www.dynamicdrive.com/) for full source code
* Modified Dec 31st, 02' by DD. This notice must stay intact for use
******************************************/
From the script :rolleyes:

Highjacker-x
14-06-2007, 12:01 AM
I Didnt rip it from there.. Stop accusing me. And I was talking about the image that I made, n it worked through the script.

Mentor
14-06-2007, 12:37 AM
I Didnt rip it from there.. Stop accusing me. And I was talking about the image that I made, n it worked through the script.

Your a crap lier...


So I decided to make a quick script.

Ive got no respect for rippers, especially those stupid enough to rip from such an obvious source, dont try and pretend you ment the image :rolleyes:

Highjacker-x
14-06-2007, 12:40 AM
reported,

HabboRing helped me with the source. & I got a hold of the habbo pointer, and put it through the source.

Mentor
14-06-2007, 12:46 AM
Im not the one whom has ripped, its an obvious fact, from your above thread and its title. The script you posted is not yours yet to claim it is. Dont be so pathetic as to try and cover it up.
This is a forum used by people with a real interest in webdesign use, i see no use for pathetic kids who steal and try to take credit for other peoples work here.

Plus this isnt breaking a rule, the rule is that your not allowed to accuse people. Im simply stateing a matter of fact anyone who wishs to scroll up can easly varifie.

Rix
14-06-2007, 12:55 AM
reported,

HabboRing helped me with the source. & I got a hold of the habbo pointer, and put it through the source.

I don't know why you need his help to rip something of DD?
lol most people are compatible of doing that themselves lol



<script>

/******************************************
* Cross browser cursor trailer script- By Brian Caputo ([email protected])
* Visit Dynamic Drive (http://www.dynamicdrive.com/) for full source code
* Modified Dec 31st, 02' by DD. This notice must stay intact for use
******************************************/

A=document.getElementById
B=document.all;
C=document.layers;
T1=new Array("trail1.gif",38,35,"trail2.gif",30,31,"trail3.gif",28,26,"trail4.gif",22,21,"trail5.gif",16,16,"trail6.gif",10,10)

var offsetx=15 //x offset of trail from mouse pointer
var offsety=10 //y offset of trail from mouse pointer

nos=parseInt(T1.length/3)
rate=50
ie5fix1=0;
ie5fix2=0;
rightedge=B? document.body.clientWidth-T1[1] : window.innerWidth-T1[1]-20
bottomedge=B? document.body.scrollTop+document.body.clientHeight-T1[2] : window.pageYOffset+window.innerHeight-T1[2]

for (i=0;i<nos;i++){
createContainer("CUR"+i,i*10,i*10,i*3+1,i*3+2,"","<img src='"+T1[i*3]+"' width="+T1[(i*3+1)]+" height="+T1[(i*3+2)]+" border=0>")
}

function createContainer(N,Xp,Yp,W,H,At,HT,Op,St){
with (document){
write((!A && !B) ? "<layer id='"+N+"' left="+Xp+" top="+Yp+" width="+W+" height="+H : "<div id='"+N+"'"+" style='position:absolute;left:"+Xp+"; top:"+Yp+"; width:"+W+"; height:"+H+"; ");
if(St){
if (C)
write(" style='");
write(St+";' ")
}
else write((A || B)?"'":"");
write((At)? At+">" : ">");
write((HT) ? HT : "");
if (!Op)
closeContainer(N)
}
}

function closeContainer(){
document.write((A || B)?"</div>":"</layer>")
}

function getXpos(N){
if (A)
return parseInt(document.getElementById(N).style.left)
else if (B)
return parseInt(B[N].style.left)
else
return C[N].left
}

function getYpos(N){
if (A)
return parseInt(document.getElementById(N).style.top)
else if (B)
return parseInt(B[N].style.top)
else
return C[N].top
}

function moveContainer(N,DX,DY){
c=(A)? document.getElementById(N).style : (B)? B[N].style : (C)? C[N] : "";
if (!B){
rightedge=window.innerWidth-T1[1]-20
bottomedge=window.pageYOffset+window.innerHeight-T1[2]
}
c.left=Math.min(rightedge, DX+offsetx);
c.top=Math.min(bottomedge, DY+offsety);
}
function cycle(){
//if (IE5)
if (document.all&&window.print){
ie5fix1=document.body.scrollLeft;
ie5fix2=document.body.scrollTop;
}
for (i=0;i<(nos-1);i++){
moveContainer("CUR"+i,getXpos("CUR"+(i+1)),getYpos("CUR"+(i+1)))
}
}

function newPos(e){
moveContainer("CUR"+(nos-1),(B)?event.clientX+ie5fix1:e.pageX+2,(B)?event.c lientY+ie5fix2:e.pageY+2)
}

function getedgesIE(){
rightedge=document.body.clientWidth-T1[1]
bottomedge=document.body.scrollHeight-T1[2]
}

if (B){
window.onload=getedgesIE
window.onresize=getedgesIE
}

if(document.layers)
document.captureEvents(Event.MOUSEMOVE)
document.onmousemove=newPos
setInterval("cycle()",rate)
</script>

Duck Hunt
14-06-2007, 12:59 AM
:L somebody close this its non-stop arguing..

Highjacker-x
14-06-2007, 01:14 AM
Well you can see who started it >.>

Mentor
14-06-2007, 01:26 AM
Someone shamlessy ripping a script? yup, on that note i must agree with you, it is indeed obvious.

Blackcomb
14-06-2007, 03:06 AM
LOL! THAT REAlly makes me tehehehe. LOL! DD ripper, thats as low as you can get, ripping from such a big site like that obviusly shows that you can't code a single thing and yet try to. GOD, NOOBIE children these days.

Ryyder
14-06-2007, 03:40 AM
Can someone just closed this thread, its full of arguing its nonsense

Oni
14-06-2007, 06:38 AM
Mentors right you started it by ripping, you should be found out and now you have, idiot.

lew!
14-06-2007, 06:47 AM
Fame Gone Wrong (l)

chrisgocrazyH
14-06-2007, 09:36 AM
lol ture xD +REP

LOL! THAT REAlly makes me tehehehe. LOL! DD ripper, thats as low as you can get, ripping from such a big site like that obviusly shows that you can't code a single thing and yet try to. GOD, NOOBIE children these days.

Edited by opensourcehost (Forum Moderator): Please don't post pointlessly.

Highjacker-x
14-06-2007, 12:01 PM
This is like the thirD time I have posted this now..

HABBORING HELPED ME WITH THE SCRIPT. & I Made the image to put it in.

dot.

end of.

nets
15-06-2007, 12:46 AM
That can be achieved through one CSS declaration. Never would I consider using that vomit of code, chiefly not to give a legacy browser support for Mickey Mouse effects. You didn't even code this gallimaufry of functions yourself anyhow.

Mentor
15-06-2007, 12:56 AM
That can be achieved through one CSS declaration. Never would I consider using that vomit of code, chiefly not to give a legacy browser support for Mickey Mouse effects. You didn't even code this gallimaufry of functions yourself anyhow.

To true, its why i hate Dynamic drive, there scripts are so rediculsy bloated even when they do such simple things. i mean is it that hard to add a cursor decloration ?

cursor : url("custom.cur");

chrisgocrazyH
16-06-2007, 02:48 AM
[quote=Highjacker-x;3600648]Last night I was bored, So I decided to make a quick script.

Its a HABBO mouse pointer for your website.

All you gotta do is simply add this code after the <head> tags on your site.


<script language="JavaScript" type="text/javascript">
A=document.getElementById
B=document.all;
C=document.layers;
T1=new Array("http://www.bobbafm.pro-hosting.org.uk/MyMouseScript/pointer.png ",35,35)
var offsetx=0 //x offset of trail from mouse pointer
var offsety=0 //y offset of trail from mouse pointer
nos=parseInt(T1.length/3)
rate=50
ie5fix1=0;
ie5fix2=0;
rightedge=B? document.body.clientWidth-T1[1] : window.innerWidth-T1[1]-20
bottomedge=B? document.body.scrollTop+document.body.clientHeight-T1[2] : window.pageYOffset+window.innerHeight-T1[2]
for (i=0;i<nos;i++){
createContainer("CUR"+i,i*10,i*10,i*3+1,i*3+2,"","<img src='"+T1[i*3]+"' width="+T1[(i*3+1)]+" height="+T1[(i*3+2)]+" border=0>")
}
function createContainer(N,Xp,Yp,W,H,At,HT,Op,St){
with (document){
write((!A && !B) ? "<layer id='"+N+"' left="+Xp+" top="+Yp+" width="+W+" height="+H : "<div id='"+N+"'"+" style='position:absolute;left:"+Xp+"; top:"+Yp+"; width:"+W+"; height:"+H+"; ");
if(St){
if (C)
write(" style='");
write(St+";' ")
}
else write((A || B)?"'":"");
write((At)? At+">" : ">");
write((HT) ? HT : "");
if (!Op)
closeContainer(N)
}
}
function closeContainer(){
document.write((A || B)?"</div>":"</layer>")
}
function getXpos(N){
if (A)
return parseInt(document.getElementById(N).style.left)
else if (B)
return parseInt(B[N].style.left)
else
return C[N].left
}
function getYpos(N){
if (A)
return parseInt(document.getElementById(N).style.top)
else if (B)
return parseInt(B[N].style.top)
else
return C[N].top
}
function moveContainer(N,DX,DY){
c=(A)? document.getElementById(N).style : (B)? B[N].style : (C)? C[N] : "";
if (!B){
rightedge=window.innerWidth-T1[1]-20
bottomedge=window.pageYOffset+window.innerHeight-T1[2]
}
c.left=Math.min(rightedge, DX+offsetx);
c.top=Math.min(bottomedge, DY+offsety);
}
function cycle(){
//if (IE5)
if (document.all&&window.print){
ie5fix1=document.body.scrollLeft;
ie5fix2=document.body.scrollTop;
}
for (i=0;i<(nos-1);i++){
moveContainer("CUR"+i,getXpos("CUR"+(i+1)),getYpos("CUR"+(i+1)))
}
}
function newPos(e){
moveContainer("CUR"+(nos-1),(B)?event.clientX+ie5fix1:e.pageX+2,(B)?event.c lientY+ie5fix2:e.pageY+2)
}
function getedgesIE(){
rightedge=document.body.clientWidth-T1[1]
bottomedge=document.body.scrollHeight-T1[2]
}
if (B){
window.onload=getedgesIE
window.onresize=getedgesIE
}
if(document.layers)
document.captureEvents(Event.MOUSEMOVE)
document.onmousemove=newPos
setInterval("cycle()",rate)
</script>


My first ever script & Its a success

Enjoy people x
quote]

I dont like it at all, It has a BIG Blue BG & can't go on FLASH & its huge.. -REP

Flisker
21-06-2007, 07:57 AM
-REP for Ripping script from DynamicDrive and not even keeping the copyright at the top...

Heinous
21-06-2007, 09:30 AM
Epic faiiiiiiil.

Want to hide these adverts? Register an account for free!