floating images
+5
Kira
XED
MhingMhengXD
Patrick
danielvicedo
9 posters
Page 1 of 1
floating images
no preview..
sorry.
CREDITS: DYNAMIC DRIVE
compile it in JS form then here you go. XD
sorry.
CREDITS: DYNAMIC DRIVE
- Code:
/***********************************************
* Floating image script- By Virtual_Max (http://www.geocities.com/siliconvalley/lakes/8620)
* Modified by Dynamic Drive for various improvements
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var vmin=2;
var vmax=5;
var vr=2;
var timer1;
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function Chip(chipname,width,height){
this.named=chipname;
this.vx=vmin+vmax*Math.random();
this.vy=vmin+vmax*Math.random();
this.w=width+20;
this.h=height;
this.xx=0;
this.yy=0;
this.timer1=null;
}
function movechip(chipname){
if (document.getElementById){
eval("chip="+chipname);
if (window.innerWidth || window.opera){
pageX=window.pageXOffset;
pageW=window.innerWidth-40;
pageY=window.pageYOffset;
pageH=window.innerHeight-20;
}
else if (document.body){
pageX=iecompattest().scrollLeft;
pageW=iecompattest().offsetWidth-40;
pageY=iecompattest().scrollTop;
pageH=iecompattest().offsetHeight-20;
}
chip.xx=chip.xx+chip.vx;
chip.yy=chip.yy+chip.vy;
chip.vx+=vr*(Math.random()-0.5);
chip.vy+=vr*(Math.random()-0.5);
if(chip.vx>(vmax+vmin)) chip.vx=(vmax+vmin)*2-chip.vx;
if(chip.vx<(-vmax-vmin)) chip.vx=(-vmax-vmin)*2-chip.vx;
if(chip.vy>(vmax+vmin)) chip.vy=(vmax+vmin)*2-chip.vy;
if(chip.vy<(-vmax-vmin)) chip.vy=(-vmax-vmin)*2-chip.vy;
if(chip.xx<=pageX){
chip.xx=pageX;
chip.vx=vmin+vmax*Math.random();
}
if(chip.xx>=pageX+pageW-chip.w){
chip.xx=pageX+pageW-chip.w;
chip.vx=-vmin-vmax*Math.random();
}
if(chip.yy<=pageY)
{chip.yy=pageY;
chip.vy=vmin+vmax*Math.random();
}
if(chip.yy>=pageY+pageH-chip.h)
{chip.yy=pageY+pageH-chip.h;
chip.vy=-vmin-vmax*Math.random();
}
document.getElementById(chip.named).style.left=chip.xx+"px";
document.getElementById(chip.named).style.top=chip.yy+"px";
chip.timer1=setTimeout("movechip('"+chip.named+"')",100);
}
}
compile it in JS form then here you go. XD
Re: floating images
tnx for this.
XED- Global Moderator
-
Posts : 6137
Age : 114
Joined date : 2009-10-22
Location : sa bag mo :]]
Cash : 32117
Re: floating images
i saw this a million times bepor. ::
&& MR. Pls provide credit when posting a code.
ghet it? got it.
&& MR. Pls provide credit when posting a code.
ghet it? got it.
MoiMoi<3- DPC Addict
-
Posts : 218
Age : 31
Joined date : 2009-10-26
Location : yur BF's room
Cash : 27826
Re: floating images
yea ok. I know it nman. I'm not putting credits 'coz I have changed some parts on my own version. got it?
Re: floating images
only a some of it ln nman e.
yu still need to put credit.
don't inborn wats not yurs.
yu still need to put credit.
don't inborn wats not yurs.
MoiMoi<3- DPC Addict
-
Posts : 218
Age : 31
Joined date : 2009-10-26
Location : yur BF's room
Cash : 27826
Re: floating images
script is quitely complicated to understand than I've seen some tricks like this before...
@rueniel
Did you change all part..?
cause seems like some script missing.and mostly bout the title floating images
btw: what floating images were suppose to see in this trick, cause I didn't see any image inside the script.
to be honest, I do some testing for this. but seems that it is not working..
maybe conflicts of codes or missing something..
@Russel
Can I share the working widget I am using now to rueniel, so that he can provide some preview and modify his script..
@rueniel
Did you change all part..?
cause seems like some script missing.and mostly bout the title floating images
btw: what floating images were suppose to see in this trick, cause I didn't see any image inside the script.
to be honest, I do some testing for this. but seems that it is not working..
maybe conflicts of codes or missing something..
@Russel
Can I share the working widget I am using now to rueniel, so that he can provide some preview and modify his script..
Marz- DPC Whiz
-
Posts : 2030
Joined date : 2009-10-17
Location : .
Cash : 242451446
Re: floating images
hmmm @ marz , alam mo naman na hindi ko katayuan ang paggwa ng scripts . sige edit lang ako .
sorry nman na . di mo na ba ko mapaptawad ? hmm .
sorry .
edit it nalang sir .
sorry nman na . di mo na ba ko mapaptawad ? hmm .
sorry .
edit it nalang sir .
Re: floating images
^
how Kyut reaction u did...
hahaha..
ofcourse u can be forgiven..xD
Mr. Marz...
yea.. some codes are missing..
like to where the image url shud be inserted..
lack of instructions indeed..
how Kyut reaction u did...
hahaha..
ofcourse u can be forgiven..xD
Mr. Marz...
yea.. some codes are missing..
like to where the image url shud be inserted..
lack of instructions indeed..
jhennyz- DPC Addict
-
Posts : 148
Age : 32
Joined date : 2010-03-04
Location : ~NOWHERETOFiND~
Cash : 27551
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum