I will take a look at it tomorrow and let you know if I understand it all. But it looks like it does exactly what I want
Main Topics
Browse All TopicsHello, I came across this statement on the macromedia site under usability issues, I would like to know how to do this.
"While intro animations are exciting, they often delay the user's access to the information they seek. Always offer users either a Skip Intro command or alternative access to your home page. On their second visit to your home page, skip the intro animation altogether (use a client-side JavaScript cookie to accomplish this) then on the destination page give the option of returning to the animation."
Actually, I would prefer a cut and paste problem solver, or a behavior package for dreamweaver 3. I don't want to go through all the trouble of deciphering the javascript commands and what they do, rather, I would like to concentrate on the flash itself. The simplest and easiest solution gets the points.
Thanks guys,
Alan
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I just found a site that does something like I want, but it seems to all be happening on the same page all within flash run by javascript.
http://store.infocus.com/
Hi Alan,
Here is the solution:
Keep the functions 'getCookie(NameOfCookie)' and 'setCookie(NameOfCookie, value, expiredays)' still between your HEAD-tags.
You can delete the other functions.
Than, somewhere between your BODY-tags (on the place you want your flashMovie) the following script:
<script language="JavaScript" type="text/javascript">
introMovie = getCookie("intromov");
if (introMovie!="true")
{
document.write("<OBJECT classid='clsid:D27CDB6E-AE
document.write(" codebase='http://download.
document.write(" WIDTH=550 HEIGHT=400>")
document.write(" <PARAM NAME=movie VALUE='introMovie.swf'> <PARAM NAME=quality VALUE=high> <PARAM NAME=scale VALUE=noborder> <PARAM NAME=bgcolor VALUE=#FFFFFF> ")
document.write(" <EMBED src='introMovie.swf' quality=high scale=noborder bgcolor=#000000 ")
document.write(" WIDTH=400 HEIGHT=550 TYPE='application/x-shockw
document.write(" PLUGINSPAGE='http://www.ma
document.write(" </EMBED></OBJECT>")
setCookie('intromov', true, 365)
}
else
{
document.write("<OBJECT classid='clsid:D27CDB6E-AE
document.write(" codebase='http://download.
document.write(" WIDTH=550 HEIGHT=400>")
document.write(" <PARAM NAME=movie VALUE='mainMovie.swf'> <PARAM NAME=quality VALUE=high> <PARAM NAME=scale VALUE=noborder> <PARAM NAME=bgcolor VALUE=#FFFFFF> ")
document.write(" <EMBED src='mainMovie.swf' quality=high scale=noborder bgcolor=#000000 ")
document.write(" WIDTH=550 HEIGHT=400 TYPE='application/x-shockw
document.write(" PLUGINSPAGE='http://www.ma
document.write(" </EMBED></OBJECT>")
}
// -->
</script>
The idear is quite te same. On entering the page Javascript looks for a cookie, doesn't it exist he writes the Object code for your intromovie, exists the cookie, he writes the code for your main-flash movie.
The only thing you have to do is in your introMovie, put an action at the and of the movie and as button action that flash loads the main movie.
Well, I hope this will be clear for you. I've tested in ie and NN4.7 and works both ways.
When you have further questions, please feel free to ask.
Greetings,
Roy
hey, thanks, I'll try it out after a good night of sleep. One last thing though, if I wanted it to go to a new page instead of just loading a different flash file, in the else section what line of code would I need to put to tell it to automatically go to for example http://www.yahoo.com
In otherwords, here is the code you have with the second part taken out and in parentheses the url, what would the code need to be there?
<script language="JavaScript" type="text/javascript">
introMovie = getCookie("intromov");
if (introMovie!="true")
{
document.write("<OBJECT classid='clsid:D27CDB6E-AE
document.write(" codebase='http://download.
document.write(" WIDTH=550 HEIGHT=400>")
document.write(" <PARAM NAME=movie VALUE='introMovie.swf'> <PARAM NAME=quality VALUE=high> <PARAM
NAME=scale VALUE=noborder> <PARAM NAME=bgcolor VALUE=#FFFFFF> ")
document.write(" <EMBED src='introMovie.swf' quality=high scale=noborder bgcolor=#000000 ")
document.write(" WIDTH=400 HEIGHT=550 TYPE='application/x-shockw
document.write(" PLUGINSPAGE='http://www.ma
document.write(" </EMBED></OBJECT>")
setCookie('intromov', true, 365)
}
else
{
(http://www.yahoo.com)
}
// -->
</script>
Again, thanks for your help, I have a feeling that I almost have it.
Alan
hmmm,
this is what I have as you wrote so far:
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function getCookie(NameOfCookie)
{
if (document.cookie.length > 0)
{
begin = document.cookie.indexOf(Na
if (begin != -1)
{
begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.s
}
}
return null;
}
function setCookie(NameOfCookie, value, expiredays)
{
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireD
document.cookie = NameOfCookie + "=" + escape(value)
+ ((expiredays == null) ? "" : "; expires=none" + ExpireDate.toGMTString());
}
</head>
<body bgcolor="#FFFFFF">
<script language="JavaScript" type="text/javascript">
introMovie = getCookie("intromov");
if (introMovie!="true")
{
document.write("<OBJECT classid='clsid:D27CDB6E-AE
document.write(" codebase='http://download.
document.write(" WIDTH=550 HEIGHT=400>")
document.write(" <PARAM NAME=movie VALUE='images/intro.swf'> <PARAM NAME=quality VALUE=high> <PARAM
NAME=scale VALUE=noborder> <PARAM NAME=bgcolor VALUE=#FFFFFF> ")
document.write(" <EMBED src='images/intro.swf' quality=high scale=noborder bgcolor=#000000 ")
document.write(" WIDTH=400 HEIGHT=550 TYPE='application/x-shockw
document.write(" PLUGINSPAGE='http://www.ma
document.write(" </EMBED></OBJECT>")
setCookie('intromov', true, 365)
}
else
{
document.write("<OBJECT classid='clsid:D27CDB6E-AE
document.write(" codebase='http://download.
document.write(" WIDTH=550 HEIGHT=400>")
document.write(" <PARAM NAME=movie VALUE='images/main.swf'> <PARAM NAME=quality VALUE=high> <PARAM
NAME=scale VALUE=noborder> <PARAM NAME=bgcolor VALUE=#FFFFFF> ")
document.write(" <EMBED src='images/main.swf' quality=high scale=noborder bgcolor=#000000 ")
document.write(" WIDTH=550 HEIGHT=400 TYPE='application/x-shockw
document.write(" PLUGINSPAGE='http://www.ma
document.write(" </EMBED></OBJECT>")
}
//-->
</script>
hi
</body>
</html>
but it doesn't seem to be working.
Did I mess up somewhere?
Alan
I figured out that I was missing
//-->
</script>
at the end of the javascript in the head tag, and missing
-->
at the beginning of the body tag, but it still isn't working even after I changed all of that. So, here is the code that I now have:
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function getCookie(NameOfCookie)
{
if (document.cookie.length > 0)
{
begin = document.cookie.indexOf(Na
if (begin != -1)
{
begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.s
}
}
return null;
}
function setCookie(NameOfCookie, value, expiredays)
{
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireD
document.cookie = NameOfCookie + "=" + escape(value)
+ ((expiredays == null) ? "" : "; expires=none" + ExpireDate.toGMTString());
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<script language="JavaScript" type="text/javascript">
<!--
introMovie = getCookie("intromov");
if (introMovie!="true")
{
document.write("<OBJECT classid='clsid:D27CDB6E-AE
document.write(" codebase='http://download.
document.write(" WIDTH=550 HEIGHT=400>")
document.write(" <PARAM NAME=movie VALUE='images/intro.swf'> <PARAM NAME=quality VALUE=high> <PARAM
NAME=scale VALUE=noborder> <PARAM NAME=bgcolor VALUE=#FFFFFF> ")
document.write(" <EMBED src='images/intro.swf' quality=high scale=noborder bgcolor=#000000 ")
document.write(" WIDTH=400 HEIGHT=550 TYPE='application/x-shockw
document.write(" PLUGINSPAGE='http://www.ma
document.write(" </EMBED></OBJECT>")
setCookie('intromov', true, 365)
}
else
{
document.write("<OBJECT classid='clsid:D27CDB6E-AE
document.write(" codebase='http://download.
document.write(" WIDTH=550 HEIGHT=400>")
document.write(" <PARAM NAME=movie VALUE='images/main.swf'> <PARAM NAME=quality VALUE=high> <PARAM
NAME=scale VALUE=noborder> <PARAM NAME=bgcolor VALUE=#FFFFFF> ")
document.write(" <EMBED src='images/main.swf' quality=high scale=noborder bgcolor=#000000 ")
document.write(" WIDTH=550 HEIGHT=400 TYPE='application/x-shockw
document.write(" PLUGINSPAGE='http://www.ma
document.write(" </EMBED></OBJECT>")
}
//-->
</script>
</body>
</html>
Hi Alan,
Just put these this line:
document.write(" <PARAM NAME=movie VALUE='images/intro.swf'> <PARAM NAME=quality VALUE=high> <PARAM
and this line
NAME=scale VALUE=noborder> <PARAM NAME=bgcolor VALUE=#FFFFFF> ")
together with a space between. Now it seems like that they are two separate lines, and then the document.write command will not work.
Your other question about loading another page the second time visit. Put this in the else section:
location.href=("http://www
Well, this is it, but when you have further questions, please feel fre to ask
Greetings,
Roy
Business Accounts
Answer for Membership
by: RoyKruyshaarPosted on 2001-02-21 at 12:07:39ID: 5865357
Hi Alan,
roy/alanmc clure/
meOfCookie +"="); ", begin); ubstring(b egin, end));
ate.getTim e() + (expiredays * 24 * 3600 * 1000));
swf", "introMov", "height=400, width=550")
swf", "introMov", "height=400, width=550")
See here for an example:
http://home.planet.nl/~lou
The first time you enter, the intro movie is showing, the second time there is only a button for the movie.
Place the following script between your head-tags:
<script language="JavaScript" type="text/javascript">
<!--
function getCookie(NameOfCookie)
{
if (document.cookie.length > 0)
{
begin = document.cookie.indexOf(Na
if (begin != -1)
{
begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.s
}
}
return null;
}
function setCookie(NameOfCookie, value, expiredays)
{
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireD
document.cookie = NameOfCookie + "=" + escape(value)
+ ((expiredays == null) ? "" : "; expires=none" + ExpireDate.toGMTString());
}
function YesNoIntro()
{
introMovie = getCookie("intromov");
if (introMovie!="true")
{
intromov = window.open("./introMovie.
setCookie('intromov', true, 365)
}
}
function showIntroMov()
{
intromov = window.open("./introMovie.
}
// -->
</script>
and the call the following javascript to start your intromovie:
showIntroMov()
Well, on the url I gave you, you can download the complete files.
When you have further questions,
please feel free to ask.
Greetings,
Roy