Flashing Text Replacing Your Google Ads
var fcontent=new Array();
begintag='<div style="font: normal 12px Century Gothic; padding: 1px;">';
fcontent[0]="TEXT HERE";
fcontent[1]="TEXT HERE";
fcontent[2]="TEXT HERE";
fcontent[3]="TEXT HERE";
closetag='</div>';
//No need to edit below this line//
var delay = 1000;
var maxsteps=20;
var stepdelay=20;
var startcolor= new Array(255,255,255);
var endcolor=new Array(0,0,0);
var fwidth='150px';
var fheight='300px';
var fadelinks=1;
var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("14").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
document.getElementById("14").innerHTML=begintag+fcontent[index]+closetag
if (fadelinks)
linkcolorchange(1);
colorfade(1, 15);
}
else if (ie4)
document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
index++
}
function linkcolorchange(step){
var obj=document.getElementById("14");
if (obj.length>0){
for (i=0;i<obj.length;i++)
obj[i].style.color=getstepcolor(step);
}
}
var fadecounter;
function colorfade(step) {
if(step<=maxsteps) {
document.getElementById("14").style.color=getstepcolor(step);
if (fadelinks)
linkcolorchange(step);
step++;
fadecounter=setTimeout("colorfade("+step+")",stepdelay);
}else{
clearTimeout(fadecounter);
document.getElementById("14").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
setTimeout("changecontent()", delay);
}
}
function getstepcolor(step) {
var diff
var newcolor=new Array(3);
for(var i=0;i<3;i++) {
diff = (startcolor[i]-endcolor[i]);
if(diff > 0) {
newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
} else {
newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
}
}
return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}
if (ie4||DOM2)
document.write('<div id="14" style="border:0px solid black;width:'+fwidth+';height:'+fheight+'"></div>');
if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent
Flashing Text In Your Shoutout (thx to dracoknight09 for the idea)
var fcontent=new Array();
begintag='<div style="font: normal 12px Century Gothic; padding: 1px;">';
fcontent[0]="TEXT HERE";
fcontent[1]="TEXT HERE";
fcontent[2]="TEXT HERE";
fcontent[3]="TEXT HERE";
closetag='</div>';
//No need to edit below this line//
var delay = 1000;
var maxsteps=20;
var stepdelay=20;
var startcolor= new Array(255,255,255);
var endcolor=new Array(0,0,0);
var fwidth='150px';
var fheight='300px';
var fadelinks=1;
var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("cpShoutoutBox").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
document.getElementById("cpShoutoutBox").innerHTML=begintag+fcontent[index]+closetag
if (fadelinks)
linkcolorchange(1);
colorfade(1, 15);
}
else if (ie4)
document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
index++
}
function linkcolorchange(step){
var obj=document.getElementById("cpShoutoutBox");
if (obj.length>0){
for (i=0;i<obj.length;i++)
obj[i].style.color=getstepcolor(step);
}
}
var fadecounter;
function colorfade(step) {
if(step<=maxsteps) {
document.getElementById("cpShoutoutBox").style.color=getstepcolor(step);
if (fadelinks)
linkcolorchange(step);
step++;
fadecounter=setTimeout("colorfade("+step+")",stepdelay);
}else{
clearTimeout(fadecounter);
document.getElementById("cpShoutoutBox").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
setTimeout("changecontent()", delay);
}
}
function getstepcolor(step) {
var diff
var newcolor=new Array(3);
for(var i=0;i<3;i++) {
diff = (startcolor[i]-endcolor[i]);
if(diff > 0) {
newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
} else {
newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
}
}
return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}
if (ie4||DOM2)
document.write('<div id="cpShoutoutBox" style="border:0px solid black;width:'+fwidth+';height:'+fheight+'"></div>');
if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent
u can change the font properties.
u also can add the number of content.
e.g
fcontent[0]="TEXT HERE";
fcontent[1]="TEXT HERE";
fcontent[2]="TEXT HERE";
fcontent[3]="TEXT HERE";
fcontent[4]="TEXT HERE";
fcontent[5]="TEXT HERE";
.............
credit goes to DYNAMIC DRIVE
a little modification by me. 
LIVE PREVIEW
Last edited by andHa (2008-01-30 15:08:07)

waaaw.... andha
any good way to hiding suck ads 

-Offline- |

i will test it for my profile
-Offline- |

aws....its working but it apperas at the top of my friends' box...and the google ad is still there...
-Offline- |
@ burnok
try to refresh it bro.
i tried it just now, and it was working fine in my test page.
the ads replaced by the text.
@ duchesz
thx sist.
just want to share it.
Last edited by andHa (2008-01-08 18:50:21)

hmmm.. andha... i was looking ur live preview and i see u was using css for hiding google ads right??
so how about if not using css for hiding google ads??
is this still work?
but any way i very like u live preview 
Last edited by wongudik (2008-01-08 18:53:58)

-Offline- |
^
iap sist.
i'm using the css code for hiding ads.
but, the code will still working even u hide or not the ads.

and, that is my shared layout that i've ever shared in this forum.

Last edited by andHa (2008-01-08 18:56:15)


sir! its working....thanks! cool code....lol...
![]()
-Offline- |

hoho....nice code...bagus-bagus ![]()
Last edited by AFZULNIZAM (2008-05-15 03:18:06)

how come i cant see it in the preview profile?

-Offline- |

wew!.. thankz for sharing 
-Offline- |

This one is cool bro...but i couldnt see any flashing object or words..only the friendster logo..
i like your css anyway! cheers!
Last edited by lordheinz (2008-01-09 10:36:02)
-Offline- |

thanks 4 share! ![]()

@ jOhnc3na & lordheinz
just refresh, if u can't see it.
i saw my shared profile just now.
here is the screenshot


Last edited by andHa (2008-01-09 11:07:20)


-Offline- |

-Offline- |
how if we want to change the font with a pic ??
-Offline- |