NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Dynamic Splash Screen effect

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 01-06-2006, 05:44 AM THREAD STARTER               #1 (permalink)
Account Closed
Join Date: Oct 2005
Location: India
Posts: 633
blackwizard is a jewel in the roughblackwizard is a jewel in the roughblackwizard is a jewel in the rough
 



Lightbulb Dynamic Splash Screen effect


Simply copy the below code, and save it as a separate html document. This is the splash page.

Select All

<html>

<head>
<title>Intro Screen...</title>
</head>

<body bgcolor="#000000" text="#FFFFFF">

<div id="splashcontainer" style="position:absolute;width:350px;"></div>

<layer id="splashcontainerns" width=450></layer>


<script>


//Specify the paths of the images to be used in the splash screen, if any.
//If none, empty out array (ie: preloadimages=new Array())
var preloadimages=new Array("http://abstract.simplenet.com/point.gif","http://abstract.simplenet.com/point2.gif")
//configure delay in miliseconds between each message (default: 2 seconds)
var intervals=2000
//configure destination URL
var targetdestination="http://www.dynamicdrive.com/dynamicindex3/dynamicsplash.htm"

//configure messages to be displayed
//If message contains apostrophe('), backslash them (ie: "I\'m fine")

var splashmessage=new Array()
var openingtags='<font face="Arial" size="4">'
splashmessage[0]='<img src="http://abstract.simplenet.com/point.gif"> Welcome <img src="http://abstract.simplenet.com/point2.gif">'
splashmessage[1]='Enjoy!'
splashmessage[2]='a great code indeed'!
splashmessage[3]='With emphasis on practicality and backwards compatibility'
splashmessage[4]='To bring true power and interactivity to your site.'
splashmessage[5]='Please stand by...'
var closingtags='</font>'
????: NamePros.com http://www.namepros.com/code/154724-dynamic-splash-screen-effect.html

//Do not edit below this line (besides HTML code at the very bottom)

var i=0

var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var theimages=new Array()

//preload images
if (document.images){
for (p=0;p<preloadimages.length;p++){
theimages[p]=new Image()
theimages[p].src=preloadimages[p]
}
}

function displaysplash(){
if (i<splashmessage.length){
sc_cross.style.visibility="hidden"
sc_cross.innerHTML='<b><center>'+openingtags+splas hmessage[i]+closingtags+'</center></b>'
sc_cross.style.left=ns6?parseInt(window.pageXOffse t)+parseInt(window.innerWidth)/2-parseInt(sc_cross.style.width)/2 : document.body.scrollLeft+document.body.clientWidth/2-parseInt(sc_cross.style.width)/2
sc_cross.style.top=ns6?parseInt(window.pageYOffset )+parseInt(window.innerHeight)/2-sc_cross.offsetHeight/2 : document.body.scrollTop+document.body.clientHeight/2-sc_cross.offsetHeight/2
sc_cross.style.visibility="visible"
i++
}
else{
window.location=targetdestination
return
}
setTimeout("displaysplash()",intervals)
}

function displaysplash_ns(){
if (i<splashmessage.length){
sc_ns.visibility="hide"
sc_ns.document.write('<b>'+openingtags+splashmessa ge[i]+closingtags+'</b>')
sc_ns.document.close()

sc_ns.left=pageXOffset+window.innerWidth/2-sc_ns.document.width/2
sc_ns.top=pageYOffset+window.innerHeight/2-sc_ns.document.height/2

sc_ns.visibility="show"
i++
}
else{
window.location=targetdestination
return
}
setTimeout("displaysplash_ns()",intervals)
}



function positionsplashcontainer(){
if (ie4||ns6){
sc_cross=ns6?document.getElementById("splashcontai ner"):document.all.splashcontainer
????: NamePros.com http://www.namepros.com/showthread.php?t=154724
displaysplash()
}
else if (ns4){
sc_ns=document.splashcontainerns
sc_ns.visibility="show"
displaysplash_ns()
}
else
window.location=targetdestination
}
window.onload=positionsplashcontainer

</script>

<!--Set href in below link to the URL of the target destination-->

<div align="right">
<table border="0" width="200" height="100%" cellspacing="0" cellpadding="0">
<td width="100%" valign="bottom" align="right">
[ <a href="http://www.dynamicdrive.com/dynamicindex3/dynamicsplash.htm"><font color="#FFFFFF">Skip Intro</font></a> ]
</td>
</table>
</div>


</body>
</html>
Last edited by adamnbates; 02-01-2006 at 04:08 AM.
blackwizard is offline  
Old 01-08-2006, 08:51 AM   #2 (permalink)
Awesomeâ„¢
 
MasterB's Avatar
Join Date: May 2005
Location: Boston
Posts: 77
MasterB is on a distinguished road
 



Line 32:
replace
Code:
splashmessage[2]='a great code indeed!
with
Code:
splashmessage[2]='a great code indeed!'
You were missing a closing '.

But wait! There's more:

Replace
Code:
sc_cross.style.left=ns6?parseInt(window.pageXOffse t)+parseInt(window.innerWidth)/2-parseInt(sc_cross.style.width)/2 : document.body.scrollLeft+document.body.clientWidth /2-parseInt(sc_cross.style.width)/2
, on line 59, with:
Code:
sc_cross.style.left=ns6?parseInt(window.pageXOffset)+parseInt(window.innerWidth)/2-parseInt(sc_cross.style.width)/2 : document.body.scrollLeft+document.body.clientWidth /2-parseInt(sc_cross.style.width)/2
.
????: NamePros.com http://www.namepros.com/showthread.php?t=154724

Now it works fine.
Last edited by MasterB; 01-08-2006 at 08:57 AM.
MasterB is offline  
Old 01-09-2006, 01:21 AM THREAD STARTER               #3 (permalink)
Account Closed
Join Date: Oct 2005
Location: India
Posts: 633
blackwizard is a jewel in the roughblackwizard is a jewel in the roughblackwizard is a jewel in the rough
 



Thanx for thw correction dude!
keep it up!
blackwizard is offline  
Old 01-21-2006, 11:23 PM   #4 (permalink)
NamePros Legend
 
weblord's Avatar
Join Date: Dec 2005
Location: Philippines - www.Nabaza.com
Posts: 19,784
weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness
 


Autism Protect Our Planet
ok thanks for the script again.
__________________
Nabaza.com - Amaia
weblord is offline  
Old 01-24-2006, 10:52 PM THREAD STARTER               #5 (permalink)
Account Closed
Join Date: Oct 2005
Location: India
Posts: 633
blackwizard is a jewel in the roughblackwizard is a jewel in the roughblackwizard is a jewel in the rough
 



Ur welcome
blackwizard is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Website Creation Software - Dynamic Content Router - DCR Jetheat Website Development 2 11-30-2005 12:39 AM
Logo and splash screen £10 FMD Design Contests 8 09-30-2005 05:36 PM
Screen Resolution, Images and Background CK1985 Web Design Discussion 1 06-05-2005 05:02 AM
3 screen savers and a cool program liam_d For Sale / Advertising Board 0 05-18-2005 05:19 AM
Resizing frame according to screen resolution????? skuba Web Design Discussion 2 07-18-2003 08:17 AM

 
All times are GMT -7. The time now is 02:31 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger