
-change A to img if u only want the image to move
- makes ur primary pic .. photo gallery... comment pic and friendlist shake
/**********************************/
/* Submitted: by: Angell de Ville */
/**********************************/
function shake(){br=document.getElementsByTagName("A");
for(bage=0;bage<br.length;bage++){br[bage].style.position="relative";
br[bage].onmouseover=function(){shakeit(this);qkie();}
br[bage].onmouseout=function(){newPosition(this);top.focus();}}}
attachOnLoadHandler(shake);sa=0;pimp=1;
function shakeit(go){sa=0;my=go;
my.style.left=0;my.style.top=0;}function qkie(){if(sa==1){return;}
if(pimp==1){my.style.top=parseInt(my.style.top)+3;pimp++;}
else if(pimp==2){my.style.left=parseInt(my.style.left)+3;pimp++;}
else if(pimp==3){my.style.top=parseInt(my.style.top)-3;pimp++;}
else{my.style.left=parseInt(my.style.left)-3;pimp=1;}
setTimeout(qkie,50)}function newPosition(go){
sa=1;go.style.left=0;go.style.top=0;}other version using math
/**************************************************/
/* Image shake - Friendster Tweaks */
/* by: Archer - www.friendsterforum.com */
/* adjust the value of speed and radius */
/**************************************************/
pics = document.getElementsByTagName('img')
FF = "Netscape"
IE = "Microsoft Interner Explorer"
radius=8
speed=5
a = 0
function tagAllPics(){
for(x=0; x<pics.length;x++){
if(navigator.appName==FF){
pics[x].setAttribute("onmouseover","tagX("+x+")")
pics[x].setAttribute("onmouseout","tagY("+x+")")
}
else{
psrc = pics[x].getAttribute("src")
pid = pics[x].getAttribute("id")
pcls = pics[x].getAttribute("class")
pics[x].outerHTML=
"<img id="+pid+" class="+pcls+" src="+psrc+
" onmouseover=tagX("+x+") onmouseout=tagY("+x+")>"}
}
}
function tagX(x){
pics[x].style.position="relative"
moveIt = setInterval("orbit("+x+")",5)
}
function tagY(x){
pics[x].style.top = "0"
pics[x].style.left= "0"
window.clearInterval(moveIt)
}
function orbit(x){
pics[x].style.top= radius*Math.cos(a/speed)
pics[x].style.left=radius*Math.sin(a/speed)
a++;}
setTimeout("tagAllPics()", 1000)Last edited by switpotato (2009-02-03 14:52:42)

|
bLeSs-x0x0-[?] likes this topic.
|

bobcbar wrote:
Thanks for sharing more cool codes swit
Is there a different in the way the two codes make the images shake?
the one made by angell makes ur image shake and links as well..
by changing the A(links) to img..
the one made by archer u can control the speed and radius ... for shake efex...
angell work is controlable thou but i find lil confusing where to control it....
but both are nice original codes... and new
Last edited by switpotato (2009-02-04 02:12:49)

|
nice short code^^
you can also change A / IMG to embed / object 

|
fren bantu donk ksh tw crax untuk mengerakan fto.......... cz aq msih pemula...........![]()
|

I find this trick for along time ago. This day,i get this trick. Smart. Btw,its working in IE browser for both script?
|

suddendeath wrote:
I find this trick for along time ago. This day,i get this trick. Smart. Btw,its working in IE browser for both script?
are you sure... show me the codes...
if theres a codes like this long time ago u should know by now if it works in both browser...
anyways heres the sample...
http://www.friendster.com/96617496
Last edited by switpotato (2009-02-05 00:44:20)

|

switpotato wrote:
are you sure... show me the codes...
Have mistaken here. I mean,im waiting for this code for along time. Today,u post this script. Sorry if i mistake. My bad english too.
|

@ sudden no big deal bro..

|

^ Tq. Im using it now. Hopefully u always keep sharing.
|

charlaine07 wrote:
wer should i paste the code after??
first this is a JS
second the codes follow no rules..
its not dependend in onload handler..
thus u can paste it in any arrangment as u wish..

|

weww so kewlll~ its shakinn'
thx for sharing sis. ahax~ :rose: 

|
where should i put it??
in css box or media box???
pls help...
tnx....
|

|

zoytie wrote:
where should i put it??
in css box or media box???
pls help...
tnx....
SoIwasAlone wrote:
thnx for the info. but wer should we put it?
just asking!
pls read the convo here....
switpotato wrote:
first this is a JS
second the codes follow no rules..
its not dependend in onload handler..
thus u can paste it in any arrangment as u wish..

|