View Full Version : flash intro page....
coolguy23
June 26th, 2001, 11:16
i have my flash intro on index.htm which directs to home.htm when the flash is finised, how can i make it so that index.htm sets a cookie in the harddrive so that the next time a person comes to the site, it goes directly to the home.htm page instead of viewing the flash again on index.htm ?
thanks if you can help... :)
lucifer
June 26th, 2001, 11:25
do you want to use
javascript - browser dependent (needs javascript on client)
document.cookie
php - server side
setcookie()
coolguy23
June 26th, 2001, 15:24
anything that would set a cookie and that works :)
lucifer
June 27th, 2001, 06:15
<script language="JavaScript">
// see if we have a cookie
if(document.cookie!=""){
// go to home
document.location="http://www.mydomain/home.html";
} else {
// set cookie - you could chage the date
document.cookie = "visited=yes;expires=Wednesday, 09-Nov-03 23:12:40 GMT";
// goto flash
document.location="http://www.mydomain/flashintro.html";
}
</script>
gyrbo
June 27th, 2001, 08:18
Originally posted by lucifer
<script language="JavaScript">
// see if we have a cookie
if(document.cookie!=""){
// go to home
document.location="http://www.mydomain/home.html";
} else {
// set cookie - you could chage the date
document.cookie = "visited=yes;expires=Wednesday, 09-Nov-03 23:12:40 GMT";
// goto flash
document.location="http://www.mydomain/flashintro.html"; // better remove this line.
}
</script>
PLace this on your index.html
lucifer
June 27th, 2001, 08:40
I know it's not perfect :D
coolguy23
June 27th, 2001, 09:17
it worked perfect! :)
lucifer
June 27th, 2001, 09:33
make sure it works when javascript isn't turned on
have a default action
coolguy23
June 27th, 2001, 20:46
i'm one step ahead of ya ;)
i just made a link after the script that will lead to my main page if javascript isn't turned on
Weapon
June 28th, 2001, 15:58
how do u actually put the flash on ur page? I made a few good ones but have no idea how, do you just go <img src"flash.swf">?
lucifer
June 28th, 2001, 16:23
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
ID=mm WIDTH=211 HEIGHT=423>
<PARAM NAME=movie VALUE="mm.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="mm.swf" quality=high bgcolor=#FFFFFF WIDTH=211 HEIGHT=423 swLiveConnect=true NAME=mm TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
works, flash in this case is mm.swf from dreamweaver
uses <object> or <embed> depending on the browser
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.