[align=center][sup]++++++++++ [color=#ff0000][Class - S] Production[/color] ++++++++++[/sup]
[img]http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/111.gif[/img][/align]

here i am again.. hahaha

[color=green][b]Credits:

Clagnut.com

Feruzz - for the main photo replacement code

dracoknight - the man behind the script

lerv yah bro! XD

ROFLMAO!

shirow masamune

me

[/b][/color]
Lets get started..

paste this

at the bottom of your JS
[quote]//DuchShiKnight 2008
//Main Photo Loading
//Like Flash XD
function fadeIn(objId,opacity) {
if (document.getElementById) {
obj = document.getElementById(objId);
if (opacity <= 100) {
setOpacity(obj, opacity);
opacity += 10;
window.setTimeout("fadeIn('"+objId+"',"+opacity+")", [b]1500[/b]);
}
}
}
function setOpacity(obj, opacity) {
opacity = (opacity == 100)?99.999:opacity;
// IE/Win
obj.style.filter = "alpha(opacity:"+opacity+")";
// Safari<1.2, Konqueror
obj.style.KHTMLOpacity = opacity/100;
// Older Mozilla and Firefox
obj.style.MozOpacity = opacity/100;
// Safari 1.2, newer Firefox and Mozilla, CSS3
obj.style.opacity = opacity/100;
}
function initImage() {
imageId = 'thephoto';
image = document.getElementById(imageId);
setOpacity(image, 0);
image.style.visibility = 'visible';
fadeIn(imageId,0);
}
window.onload = function() {initImage()}
if (!attachOnLoadHandler(function() { PRIMARYIMAGE.init();})) window.onload = function() { PRIMARYIMAGE.init();};
if (typeof PRIMARYIMAGE == "undefined") { PRIMARYIMAGE = {}; }
PRIMARYIMAGE = {
HTML: null,
sibling: null,
init: function() {
PRIMARYIMAGE.HTML = document.createElement("DIV");
PRIMARYIMAGE.HTML.innerHTML = "<div id=\"photoholder\"><img id=\"thephoto\" src='[b]URL OF IMAGE[/b]' /><br></div>";
PRIMARYIMAGE.sibling = PRIMARYIMAGE.getModuleByClassName(/imgblock200/i)[0];
PRIMARYIMAGE.sibling.parentNode.replaceChild(PRIMARYIMAGE.HTML,PRIMARYIMAGE.sibling);
},
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;
}
};
document.write('<div id="photoholder"><img id="thephoto" src=[b]URL OF THE SAME IMAGE[/b] /><br></div>');[/quote]

you can edit how long it will load.. find [b]1500 [/b]in the codes above. 1000=1sec... and of course the URL of your image.

This goes to your CSS

[quote]#photoholder {
width:200px;
height:150px;
background:#fff url('http://i223.photobucket.com/albums/dd224/abet2m4/loading.gif') 50% 50% no-repeat;
}
#thephoto {
width:200px;
height:150px;
filter:alpha(opacity=0);
-moz-opacity:0.0;opacity: 0.0;
}
.imgblock200 {display:none! important;}[/quote]
thats it!

[b]Preview:[/b] [url=http://profiles.friendster.com/56419498]Click Me![/url]

eptokers have fun! wakoko XD
Last edited by ducheszv (2008-05-13 01:00:24)