urios07 Newcomer
Number of posts : 150 Age : 33 Location : (secret) Job/hobbies : (secret) <font color=\"cyan\">Reputation</font> : <font color=\"red\">Violations</font> : <font color=\"lightgreen\">Credit</font&g : Status : In a Relationship Registration date : 2008-08-15
| Subject: Falling Objects. Sat Aug 16, 2008 3:13 pm | |
| Title: Falling Objects Credit: http://www.fallingobjects.info/ Click Here for the Preview! Add this code to your JS! Open the spoiler to see the code!- Spoiler:
- Quote :
setconfig("http://www.fallingobjects.info/gifs/1197822659523.gif",10,2); var oldwindoww,oldwindowh,windoww,windowh,whichbrowser,picture,total,speed,oldhiddentop,hiddentop,moving; window.onresize = windowsize; window.onscroll = scrollcheck; function browsertype() { if(!document.all) { if(document.getElementById) whichbrowser=1; } else whichbrowser=2; } function windowsize() { if(whichbrowser=="") browsertype(); if(whichbrowser==1) { if(oldwindoww=="") oldwindoww=window.innerWidth; else oldwindoww=windoww; windoww=window.innerWidth; if(oldwindowh=="") oldwindowh=window.innerHeight; else oldwindowh=windowh; windowh=window.innerHeight+hiddentop; } else { if(oldwindoww=="") oldwindoww=document.body.clientWidth; else oldwindoww=windoww; windoww=document.body.clientWidth; if(oldwindowh=="") oldwindowh=document.body.clientHeight; else oldwindowh=windowh; windowh=document.body.clientHeight+hiddentop; } if(moving) { var averagediff = (windoww-oldwindoww)/oldwindoww; var averagediff2 = (windowh-oldwindowh)/oldwindowh; for(i=1;i<=total;i++) { var checkleft = parseInt(document.getElementById("movingobject"+i).style.left); var newleft = parseInt(checkleft+averagediff*checkleft); if(newleft<0) newleft=0; if(newleft>(windoww-70)) newleft = windoww-70; document.getElementById("movingobject"+i).style.left = newleft; var checktop = parseInt(document.getElementById("movingobject"+i).style.top); var newtop = parseInt(checktop+averagediff2*checktop); if(newtop>(windowh-50)) newtop=Math.round(Math.random()*(-600)-100); document.getElementById("movingobject"+i).style.top = newtop; } } } function scrollcheck(){ if(whichbrowser=="") browsertype(); if(whichbrowser==1) { oldhiddentop=hiddentop; hiddentop = window.pageYOffset; } else { oldhiddentop=hiddentop; hiddentop = document.body.scrollTop; } //alert(hiddentop+ " "+oldhiddentop); if(moving) { oldwindowh=windowh; windowh=windowh+(hiddentop-oldhiddentop); for(i=1;i<=total;i++) { var checktop = parseInt(document.getElementById("movingobject"+i).style.top); var newtop = parseInt(checktop+(hiddentop-oldhiddentop)); document.getElementById("movingobject"+i).style.top = newtop; } } } function setconfig(temppicture,temptotal,tempspeed) { if(tempspeed>3) tempspeed=3; if(tempspeed<1) tempspeed=1; if(temptotal<10) temptotal=10; if(temptotal>100) temptotal = 100; oldhiddentop=0; hiddentop=0; picture = temppicture; total = temptotal; speed = tempspeed; browsertype(); windowsize(); scrollcheck(); populate(); move(); } function populate() { var randleft; var randtop; for(i=1;i<=total;i++) { randleft = Math.round(Math.random()*(windoww-100)+30); randtop = Math.round(Math.random()*(-600)-100); if(randleft<0) randleft=0; document.write(""); } } function move() { var movedown; var moveleft; var currenttop; var currentleft; var newtop; var newleft; moving = 1; for(i=1;i<=total;i++) { movedown = Math.round(Math.random()*speed+speed) currenttop = parseInt(document.getElementById("movingobject"+i).style.top); newtop = parseInt(currenttop+movedown); if(newtop>(windowh-50)) { document.getElementById("movingobject"+i).style.top=hiddentop; continue; } currentleft = parseInt(document.getElementById("movingobject"+i).style.left); moveleft = Math.round(Math.cos(Math.random()*Math.PI)*1.5); if(parseInt(currentleft+moveleft)<(windoww-70)) newleft = parseInt(currentleft+moveleft); else newleft = parseInt(currentleft-moveleft); document.getElementById("movingobject"+i).style.top= newtop; document.getElementById("movingobject"+i).style.left= newleft; } setTimeout("move()",90/speed); }
Legends:
- Red the URL of the GIF image.
- Blue the number of objects.. (its up to you how many objects will fall.)
c. 3 is Fast
@mods, delete this topic if you dont want this trick..
| |
|
JL[the_listener] GFX Designer
Number of posts : 157 Age : 31 Location : in His time Job/hobbies : student//Forumer <font color=\"cyan\">Reputation</font> : <font color=\"red\">Violations</font> : <font color=\"lightgreen\">Credit</font&g : Status : In a Relationship Registration date : 2008-07-28
| Subject: Re: Falling Objects. Sun Aug 17, 2008 9:56 am | |
| christian pls dont put spoiler...its hard for me to copy... nice one again... | |
|
chokowako Newcomer
Number of posts : 18 Age : 38 Location : zamboanga Job/hobbies : chating editing <font color=\"cyan\">Reputation</font> : <font color=\"red\">Violations</font> : <font color=\"lightgreen\">Credit</font&g : Registration date : 2008-07-29
| Subject: Re: Falling Objects. Mon Aug 18, 2008 7:19 pm | |
| - urios07 wrote:
- Title: Falling Objects
Credit: http://www.fallingobjects.info/
Click Here for the Preview!
Add this code to your JS!
Open the spoiler to see the code!
- Spoiler:
- Quote :
setconfig("http://www.fallingobjects.info/gifs/1197822659523.gif",10,2); var oldwindoww,oldwindowh,windoww,windowh,whichbrowser,picture,total,speed,oldhiddentop,hiddentop,moving; window.onresize = windowsize; window.onscroll = scrollcheck; function browsertype() { if(!document.all) { if(document.getElementById) whichbrowser=1; } else whichbrowser=2; } function windowsize() { if(whichbrowser=="") browsertype(); if(whichbrowser==1) { if(oldwindoww=="") oldwindoww=window.innerWidth; else oldwindoww=windoww; windoww=window.innerWidth; if(oldwindowh=="") oldwindowh=window.innerHeight; else oldwindowh=windowh; windowh=window.innerHeight+hiddentop; } else { if(oldwindoww=="") oldwindoww=document.body.clientWidth; else oldwindoww=windoww; windoww=document.body.clientWidth; if(oldwindowh=="") oldwindowh=document.body.clientHeight; else oldwindowh=windowh; windowh=document.body.clientHeight+hiddentop; } if(moving) { var averagediff = (windoww-oldwindoww)/oldwindoww; var averagediff2 = (windowh-oldwindowh)/oldwindowh; for(i=1;i<=total;i++) { var checkleft = parseInt(document.getElementById("movingobject"+i).style.left); var newleft = parseInt(checkleft+averagediff*checkleft); if(newleft<0) newleft=0; if(newleft>(windoww-70)) newleft = windoww-70; document.getElementById("movingobject"+i).style.left = newleft; var checktop = parseInt(document.getElementById("movingobject"+i).style.top); var newtop = parseInt(checktop+averagediff2*checktop); if(newtop>(windowh-50)) newtop=Math.round(Math.random()*(-600)-100); document.getElementById("movingobject"+i).style.top = newtop; } } } function scrollcheck(){ if(whichbrowser=="") browsertype(); if(whichbrowser==1) { oldhiddentop=hiddentop; hiddentop = window.pageYOffset; } else { oldhiddentop=hiddentop; hiddentop = document.body.scrollTop; } //alert(hiddentop+ " "+oldhiddentop); if(moving) { oldwindowh=windowh; windowh=windowh+(hiddentop-oldhiddentop); for(i=1;i<=total;i++) { var checktop = parseInt(document.getElementById("movingobject"+i).style.top); var newtop = parseInt(checktop+(hiddentop-oldhiddentop)); document.getElementById("movingobject"+i).style.top = newtop; } } } function setconfig(temppicture,temptotal,tempspeed) { if(tempspeed>3) tempspeed=3; if(tempspeed<1) tempspeed=1; if(temptotal<10) temptotal=10; if(temptotal>100) temptotal = 100; oldhiddentop=0; hiddentop=0; picture = temppicture; total = temptotal; speed = tempspeed; browsertype(); windowsize(); scrollcheck(); populate(); move(); } function populate() { var randleft; var randtop; for(i=1;i<=total;i++) { randleft = Math.round(Math.random()*(windoww-100)+30); randtop = Math.round(Math.random()*(-600)-100); if(randleft<0) randleft=0; document.write(""); } } function move() { var movedown; var moveleft; var currenttop; var currentleft; var newtop; var newleft; moving = 1; for(i=1;i<=total;i++) { movedown = Math.round(Math.random()*speed+speed) currenttop = parseInt(document.getElementById("movingobject"+i).style.top); newtop = parseInt(currenttop+movedown); if(newtop>(windowh-50)) { document.getElementById("movingobject"+i).style.top=hiddentop; continue; } currentleft = parseInt(document.getElementById("movingobject"+i).style.left); moveleft = Math.round(Math.cos(Math.random()*Math.PI)*1.5); if(parseInt(currentleft+moveleft)<(windoww-70)) newleft = parseInt(currentleft+moveleft); else newleft = parseInt(currentleft-moveleft); document.getElementById("movingobject"+i).style.top= newtop; document.getElementById("movingobject"+i).style.left= newleft; } setTimeout("move()",90/speed); }
Legends:
- Red the URL of the GIF image.
- Blue the number of objects.. (its up to you how many objects will fall.)
c. 3 is Fast
@mods, delete this topic if you dont want this trick..
bro dont make doble posting!!! this trick is just desame with mine!!! you see the falling iamge on your profile trick in this forums!! its similar bro!!! | |
|
urios07 Newcomer
Number of posts : 150 Age : 33 Location : (secret) Job/hobbies : (secret) <font color=\"cyan\">Reputation</font> : <font color=\"red\">Violations</font> : <font color=\"lightgreen\">Credit</font&g : Status : In a Relationship Registration date : 2008-08-15
| Subject: Re: Falling Objects. Sun Aug 24, 2008 3:35 am | |
| sorry if i have same trick with you.. but this trick, you can control the number of the falling objects... its 1 to 100.. | |
|
breaker2 Layout Designer
Number of posts : 383 Age : 28 Location : meycauayan,bulacan Job/hobbies : playing computer,creating layout,surfing net <font color=\"cyan\">Reputation</font> : <font color=\"red\">Violations</font> : <font color=\"lightgreen\">Credit</font&g : Status : In a Relationship Registration date : 2008-07-12
| Subject: Re: Falling Objects. Mon Aug 25, 2008 4:32 am | |
| | |
|
Sponsored content
| Subject: Re: Falling Objects. | |
| |
|