Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookie to stop flash movie re-playing 1

Status
Not open for further replies.

joebest

Programmer
Mar 2, 2007
10
GB
Hello people,

I'm developing a site which has a flash intro (it's been imposed on me by the directors) that has already caused major problems due to the way it displays. I've managed to get around those, but i was wondering if any of you guys know how to stop the movie playing again once a visitor has seen it. I'm assuming it would be some kind of cookie, but i don't know how to implement that.
TIA.
Joe
 
Use actionscript within the flash movie to call a script to set a cookie. The script can be written in Javascript or a server side language (PHP, ASP, ColdFusion etc) which is probably preferable.

Then, on the page that loads the Flash movie, first use a script to check for the presence of the Cookie.

In PHP to set a cookie use

Code:
<?php
setcookie('skipIntro','true');
?>

and to check the cookie
Code:
<?php
if($_COOKIES['skipIntro'] != true){
  show_the_flash_page
} else {
  do_something_else
}
?>

You may also want to look at if you are using PHP.

None of the options are XHTML or CSS related though.
try these forums for further info
Javascript Forum (Forum216)
PHP Forum (Forum434)


<honk>*:O)</honk>

Earl & Thompson Marketing - Marketing Agency Services in Gloucestershire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top