FSTUTS FORUMERS
Dont forget to join!

Please Read the forum rules and regulations before posting^_^

Thank You!

Shaking Primary Picture

View previous topic View next topic Go down

Shaking Primary Picture

Post by Psycho Dancer on Fri May 29, 2009 1:06 pm

Code:
if (!attachOnLoadHandler(function() { SHAKEIMG.init();})) window.onload = function() { SHAKEIMG.init();};

if (typeof SHAKEIMG == "undefined") { SHAKEIMG = {}; }
SHAKEIMG = {
        stopIt: 0,
        stopAt: 1,
        deg: 3,

        classShake: function() {
                try {
                    sty = document.createElement("style");
                    sty.type = "text/css";
                    sty.innerHTML = ".shakeIt{position:relative;}";
                    document.getElementsByTagName("head")[0].appendChild(sty);
                }catch(e){}
                try {
                    document.styleSheets[document.styleSheets.length - 1].addRule(".shakeIt", "position:relative;");
                }catch(e){}
        },

        init: function() {
                imgSrc = this.getModuleByClassName(/imgblock200/i)[0].getElementsByTagName("img")[0].getAttribute("src");
                getSrc = this.getModuleByClassName(/imgblock200/i)[0].getElementsByTagName("a")[0];
                getSrc.innerHTML = "<img src=\""+imgSrc+"\" class=\"shakeIt\" onMouseover=\"SHAKEIMG.initshake(this);SHAKEIMG.rattleimage()\" onMouseout=\"SHAKEIMG.stoprattle(this);top.focus()\" onClick=\"top.focus()\">";
                SHAKEIMG.classShake();
        },

        initshake: function(x) {
                this.stopIt = 0;
                goyang = x;
                goyang.style.left = 0;
                goyang.style.top = 0;
        },

        rattleimage: function() {
                if ((!document.all && !document.getElementById) || this.stopIt == 1) {
                    return;
                }
                if (this.stopAt == 1) {
                    goyang.style.top = parseInt(goyang.style.top)+this.deg;
                }else if (this.stopAt == 2) {
                          goyang.style.left = parseInt(goyang.style.left)+this.deg;
                }else if (this.stopAt == 3) {
                          goyang.style.top = parseInt(goyang.style.top)-this.deg;
                }else {
                    goyang.style.left = parseInt(goyang.style.left)-this.deg;
                }
                if (this.stopAt < 4) {
                    this.stopAt++;
                }else {
                    this.stopAt = 1;
                }
                setTimeout("SHAKEIMG.rattleimage()",50);
        },

        stoprattle: function(x) {
                this.stopIt = 1;
                x.style.left = 0;
                x.style.top = 0;
        },

        getModuleByClassName: function(sClass) {
                var elm = [];
                var els = document.getElementsByTagName("*") || document.all;
                for (var j=0,k=els.length;j<k;j++) {
                        if (new RegExp(sClass).test(els[j].className))elm.push(els[j]);
                }
                return elm;
        }
};

Paste it on your External Js

_________________
Just Give me Repu or Thanks by Clicking the + in my field if i help You ^^



I love my Haterz coZ thEy make me famous


avatar
Psycho Dancer
MOD
MOD

Posts : 166
Reputation : 45
Join date : 2009-05-27
Age : 27
Location : Binangonan Rizal

http://www.friendster.com/psychodancer

Back to top Go down

Re: Shaking Primary Picture

Post by [DYOSZA]JiNRiKiSHA on Fri May 29, 2009 2:25 pm

wahaha!!
thanks again for the codes.

CREDITS please Razz

_________________
avatar
[DYOSZA]JiNRiKiSHA
Graphic Artist
Graphic Artist

Posts : 207
Reputation : 15
Join date : 2009-05-26
Age : 26
Location : Mars

http://www.friendster.com/miinidii

Back to top Go down

Re: Shaking Primary Picture

Post by [DYOSZA] Allana on Sun May 31, 2009 8:26 pm

Wulang AUTO PASTE CODE?
avatar
[DYOSZA] Allana
Amatuer
Amatuer

Posts : 21
Reputation : 5
Join date : 2009-05-30
Age : 25
Location : Paris (france)

http://profiles.friendster.com/hoybawalepaldito

Back to top Go down

Re: Shaking Primary Picture

Post by Psycho Dancer on Sun May 31, 2009 9:06 pm

wag tamad hehehe

_________________
Just Give me Repu or Thanks by Clicking the + in my field if i help You ^^



I love my Haterz coZ thEy make me famous


avatar
Psycho Dancer
MOD
MOD

Posts : 166
Reputation : 45
Join date : 2009-05-27
Age : 27
Location : Binangonan Rizal

http://www.friendster.com/psychodancer

Back to top Go down

Re: Shaking Primary Picture

Post by [DYOSZA] Allana on Sun May 31, 2009 9:16 pm

Waaa!!
avatar
[DYOSZA] Allana
Amatuer
Amatuer

Posts : 21
Reputation : 5
Join date : 2009-05-30
Age : 25
Location : Paris (france)

http://profiles.friendster.com/hoybawalepaldito

Back to top Go down

Re: Shaking Primary Picture

Post by Psycho Dancer on Sun May 31, 2009 9:19 pm

hahahaha post pa me codes daihan ko

_________________
Just Give me Repu or Thanks by Clicking the + in my field if i help You ^^



I love my Haterz coZ thEy make me famous


avatar
Psycho Dancer
MOD
MOD

Posts : 166
Reputation : 45
Join date : 2009-05-27
Age : 27
Location : Binangonan Rizal

http://www.friendster.com/psychodancer

Back to top Go down

Re: Shaking Primary Picture

Post by [DYOSZA] Allana on Sun May 31, 2009 9:34 pm

Cge po peo samahan nio na po ng AUTO PASTE CODES! haha!
avatar
[DYOSZA] Allana
Amatuer
Amatuer

Posts : 21
Reputation : 5
Join date : 2009-05-30
Age : 25
Location : Paris (france)

http://profiles.friendster.com/hoybawalepaldito

Back to top Go down

Re: Shaking Primary Picture

Post by PLAYBOY[FORBIDDEN_LOVE] on Mon Jun 01, 2009 1:36 am

thx for info
but r2p wala wahaha lol!
avatar
PLAYBOY[FORBIDDEN_LOVE]
Amatuer
Amatuer

Posts : 93
Reputation : 10
Join date : 2009-05-26
Age : 28
Location : saudi

Back to top Go down

Re: Shaking Primary Picture

Post by [PLAYBOY] POSER.FACE on Wed Jun 03, 2009 11:46 am

preview?? wahaha.. nice kua paul..

_________________

avatar
[PLAYBOY] POSER.FACE
ADMIN
ADMIN

Posts : 71
Reputation : 19
Join date : 2009-05-26
Age : 24
Location : PLAYBOY COUNTRY

Back to top Go down

Re: Shaking Primary Picture

Post by JM RADA on Wed Jun 03, 2009 12:35 pm

English please..... preceeding non english messages will be deleted... TY!
avatar
JM RADA
ADMIN
ADMIN

Posts : 100
Reputation : 2
Join date : 2009-05-26
Age : 27
Location : UNDER UR CHEST

http://profiles.friendster.com/jmrada

Back to top Go down

Re: Shaking Primary Picture

Post by [DYOSZA]SHEYN on Wed Jun 03, 2009 5:57 pm

-- an sipag ahh.. wahaha

_________________


| FS CO |
| PLURK! |



isnt it CUTE?! Very Happy

avatar
[DYOSZA]SHEYN
MOD
MOD

Posts : 128
Reputation : 15
Join date : 2009-05-26
Age : 23
Location : bulacan

Back to top Go down

Re: Shaking Primary Picture

Post by [DYOSZA]gane on Sun Jun 21, 2009 9:08 am

tenchu s share
avatar
[DYOSZA]gane
MOD
MOD

Posts : 221
Reputation : 122
Join date : 2009-05-26
Age : 20
Location : Baguio City, Philippines

Back to top Go down

Re: Shaking Primary Picture

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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