::FsTactics::
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Aquarium profile Tooltips w/ bubble cursor and fish effect!!!

2 posters

Go down

Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Empty Aquarium profile Tooltips w/ bubble cursor and fish effect!!!

Post by ayeh-empty Thu Oct 16, 2008 6:00 am

CREDITS TO FTALK

REQUIREMENT'S:

*COMMON SENSE

*JAVASCRIPT LANGUAGE

*YERSELF


For yer js code' here

Spoiler:

Compile yer code and replace the url of cursor.js and effect.js

Code's for yer cursor.js


Code:

// Under Water Mouse - Kurt Grigg - // http://www.btinternet.com/~kurt.grigg/javascript
n4=(document.layers);
n6=(document.getElementById&&!document.all);
ie=(document.all);
o6=(navigator.appName.indexOf("Opera") != -1)?true:false;

img0=new Image();
img0.src="http://img254.imageshack.us/img254/1052/bluebubhq5.gif";

num=(n6)?10:15;

buby=0;
bubx=0;
if (n4||n6){
window.captureEvents(Event.MOUSEMOVE);
function mouse1(e){
buby = e.pageY-20-window.pageYOffset;
bubx = e.pageX-4;
}
if (n4) window.onMouseMove=mouse1;
else document.onmousemove=mouse1;
}
if (ie||o6){
function mouse2(){
buby = (ie)?event.clientY-20:event.clientY-20-window.pageYOffset;
bubx = event.clientX-4;
}
document.onmousemove=mouse2;
}
yp=new Array();
xp=new Array();
sp=new Array();
rt=new Array();
gr=new Array();
s1=new Array();
s2=new Array();
nz=new Array();
wh=(ie)?window.document.body.clientHeight:window.innerHeight;
for (i=0; i < num; i++){                                                             
yp[i]=Math.random()*wh-buby;
xp[i]=bubx;
sp[i]= 6+Math.random()*3;
s1[i]=0;
s2[i]=Math.random()*0.1+0.05;
gr[i]=4;
nz[i]=Math.random()*15+5;
rt[i]=Math.random()*0.5+0.1;
}
if (n4){
for (i=0; i < num; i++){
document.write("<LAYER NAME='bub"+i+"' LEFT=0 TOP=-50>"
+"<img src='bluebub.gif' width="+nz[i]+" height="+nz[i]+"></LAYER>");
}
}
if (ie){
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < num; i++){
document.write('<img id="bub'+i+'" src="'+img0.src+'" style="position:absolute;top:-50px;left:0px">');
}
document.write('</div></div>');
}
if (n6||o6){
for (i=0; i < num; i++){
document.write("<div id='bub"+i+"' style='position:absolute;top:-50px;left:0px'>"
+"<img src="+img0.src+" width="+nz[i]+" height="+nz[i]+"></div>");
}
}
function MouseBubbles(){
scy=(document.all)?document.body.scrollTop:window.pageYOffset;
scx=(document.all)?document.body.scrollLeft:window.pageXOffset;
for (i=0; i < num; i++){
sy = sp[i]*Math.sin(270*Math.PI/180);
sx = sp[i]*Math.cos(s1[i]*5);
yp[i]+=sy;
xp[i]+=sx;
if (yp[i] < -40){
yp[i]=buby;
xp[i]=bubx;
sp[i]= 6+Math.random()*3;
gr[i]=4;
nz[i]=Math.random()*15+5;
}
if (n4){
document.layers["bub"+i].left=xp[i]+scx;
document.layers["bub"+i].top=yp[i]+scy;
}
if (ie){
document.getElementById("bub"+i).style.left=xp[i]+scx;
document.getElementById("bub"+i).style.top=yp[i]+scy;
document.getElementById("bub"+i).style.width=gr[i];
document.getElementById("bub"+i).style.height=gr[i];
}
if (n6||o6){
document.getElementById("bub"+i).style.left=xp[i]+scx;
document.getElementById("bub"+i).style.top=yp[i]+scy;
}
gr[i]+=rt[i];
s1[i]+=s2[i];
if (gr[i] > 14) gr[i]=15;
}
setTimeout('MouseBubbles()',10);
}
MouseBubbles();
//-->


SAVE THE CODE ABOVE AS CURSOR.JS


CODE'S FOR YER EFFECT.JS
Code:

/*
This Code Free To Use - Providing This Notice Remains
Flying Butterfly script (By BGAudioDr@aol.com)
Modified slightly/ permission granted to DesignerWiz.com to feature script in archive
JavaScript Code Effect Found At: Development Resource & JavaScript Code & Generator Public Archive Center
Located: http://www.DesignerWiz.com
Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply*/

var Ymax=8;  //MAX # OF PIXEL STEPS IN THE "X" DIRECTION
var Xmax=8;  //MAX # OF PIXEL STEPS IN THE "Y" DIRECTION
var Tmax=10000;  //MAX # OF MILLISECONDS BETWEEN PARAMETER CHANGES

//FLOATING IMAGE URLS FOR EACH IMAGE. ADD OR DELETE ENTRIES. KEEP ELEMENT NUMERICAL ORDER STARTING WITH "0" !!

var floatimages=new Array();
floatimages[0]='http://img379.imageshack.us/img379/3292/56614324qp3.gif';
floatimages[1]='http://img262.imageshack.us/img262/6876/94921087nf9.gif';
floatimages[2]='http://img379.imageshack.us/img379/3292/56614324qp3.gif';
floatimages[3]='http://img185.imageshack.us/img185/9198/27078554od8.gif';

//*********DO NOT EDIT BELOW***********
var NS4 = (navigator.appName.indexOf("Netscape")>=0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5)? true : false;
var IE4 = (document.all)? true : false;
var NS6 = (parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var wind_w, wind_h, t='', IDs=new Array();
for(i=0; i<floatimages.length; i++){
t+=(NS4)?'<layer name="pic'+i+'" visibility="hide" width="10" height="10"><a href="javascript:hidebutterfly()">' : '<div id="pic'+i+'" style="position:absolute; visibility:hidden;width:10px; height:10px"><a href="javascript:hidebutterfly()">';
t+='<img src="'+floatimages[i]+'" name="p'+i+'" border="0">';
t+=(NS4)? '</a></layer>':'</a></div>';
}
document.write(t);

function moveimage(num){
if(getidleft(num)+IDs[num].W+IDs[num].Xstep >= wind_w+getscrollx())IDs[num].Xdir=false;
if(getidleft(num)-IDs[num].Xstep<=getscrollx())IDs[num].Xdir=true;
if(getidtop(num)+IDs[num].H+IDs[num].Ystep >= wind_h+getscrolly())IDs[num].Ydir=false;
if(getidtop(num)-IDs[num].Ystep<=getscrolly())IDs[num].Ydir=true;
moveidby(num, (IDs[num].Xdir)? IDs[num].Xstep :  -IDs[num].Xstep , (IDs[num].Ydir)?  IDs[num].Ystep:  -IDs[num].Ystep);
}

function getnewprops(num){
IDs[num].Ydir=Math.floor(Math.random()*2)>0;
IDs[num].Xdir=Math.floor(Math.random()*2)>0;
IDs[num].Ystep=Math.ceil(Math.random()*Ymax);
IDs[num].Xstep=Math.ceil(Math.random()*Xmax)
setTimeout('getnewprops('+num+')', Math.floor(Math.random()*Tmax));
}

function getscrollx(){
if(NS4 || NS6)return window.pageXOffset;
if(IE4)return document.body.scrollLeft;
}

function getscrolly(){
if(NS4 || NS6)return window.pageYOffset;
if(IE4)return document.body.scrollTop;
}

function getid(name){
if(NS4)return document.layers[name];
if(IE4)return document.all[name];
if(NS6)return document.getElementById(name);
}

function moveidto(num,x,y){
if(NS4)IDs[num].moveTo(x,y);
if(IE4 || NS6){
IDs[num].style.left=x+'px';
IDs[num].style.top=y+'px';
}}

function getidleft(num){
if(NS4)return IDs[num].left;
if(IE4 || NS6)return parseInt(IDs[num].style.left);
}

function getidtop(num){
if(NS4)return IDs[num].top;
if(IE4 || NS6)return parseInt(IDs[num].style.top);
}

function moveidby(num,dx,dy){
if(NS4)IDs[num].moveBy(dx, dy);
if(IE4 || NS6){
IDs[num].style.left=(getidleft(num)+dx)+'px';
IDs[num].style.top=(getidtop(num)+dy)+'px';
}}

function getwindowwidth(){
if(NS4 || NS6)return window.innerWidth;
if(IE4)return document.body.clientWidth;
}

function getwindowheight(){
if(NS4 || NS6)return window.innerHeight;
if(IE4)return document.body.clientHeight;
}

function init(){
wind_w=getwindowwidth();
wind_h=getwindowheight();
for(i=0; i<floatimages.length; i++){
IDs[i]=getid('pic'+i);
if(NS4){
IDs[i].W=IDs[i].document.images["p"+i].width;
IDs[i].H=IDs[i].document.images["p"+i].height;
}
if(NS6 || IE4){
IDs[i].W=document.images["p"+i].width;
IDs[i].H=document.images["p"+i].height;
}
getnewprops(i);
moveidto(i , Math.floor(Math.random()*(wind_w-IDs[i].W)), Math.floor(Math.random()*(wind_h-IDs[i].H)));
if(NS4)IDs[i].visibility = "show";




if(IE4 || NS6)IDs[i].style.visibility = "visible";
startfly=setInterval('moveimage('+i+')',Math.floor(Math.random()*100)+100);
}}

function hidebutterfly(){
for(i=0; i<floatimages.length; i++){
if (IE4)
eval("document.all.pic"+i+".style.visibility='hidden'")
else if (NS6)
document.getElementById("pic"+i).style.visibility='hidden'
else if (NS4)
eval("document.pic"+i+".visibility='hide'")
clearInterval(startfly)
}
}

if (NS4||NS6||IE4){
window.onload=init;
window.onresize=function(){ wind_w=getwindowwidth(); wind_h=getwindowheight(); }
}


Save the code as effect.js


Screenshot's

Spoiler:

For yer preview(Live)(REFRESH THE PAGE IF THE CODE WON'T WORK OKEI?)

Spoiler:
Since u've having hard time to get up w/ this one here's a premade Code Just paste the code in yer about me/who i want to meet.. o.O

Code:
<script src="http://www.stormpages.com/ayeh19/flyingfish.js"></script>

ayeh-empty
ayeh-empty
Moderator
Moderator

Male
Number of posts : 38
Age : 31
Location : cavite
Forum Contribution :
Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Left_bar_bleue0 / 1000 / 100Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Right_bar_bleue

Reputation points :
Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Left_bar_bleue0 / 1000 / 100Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Right_bar_bleue

Forum warnings :
Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Left_bar_bleue0 / 1000 / 100Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Right_bar_bleue

Registration date : 2008-10-14

http://profiles.friendster.com/ayehempty

Back to top Go down

Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Empty Re: Aquarium profile Tooltips w/ bubble cursor and fish effect!!!

Post by LYSSA13 Sun Dec 07, 2008 7:27 am

Kewl!

nasubukan ko na yan brO

pero la na ngaun Sa Fs ko yan!

nacRa ung Fs ko dhil dyan.

=X nasobrhan ata ng efectxx ep-es ku ee
LYSSA13
LYSSA13
Co-admin
Co-admin

Female
Number of posts : 157
Age : 28
Location : manila/pampangga
Job/hobbies : chatting,editing fs,reading,coding
Forum Contribution :
Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Left_bar_bleue0 / 1000 / 100Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Right_bar_bleue

Reputation points :
Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Left_bar_bleue0 / 1000 / 100Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Right_bar_bleue

Forum warnings :
Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Left_bar_bleue0 / 1000 / 100Aquarium profile Tooltips w/ bubble cursor and fish effect!!! Right_bar_bleue

Registration date : 2008-10-19

http://www.xat.com/geoadikzz

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum