Having flash header load only once per user visit.

We have a flash header that replays everytime the page loads. You can see it here: http://www.phyllisgoldie.com/index.php. Is there a way to have it load once, then when a new link is clicked on the header, it doesnt load again? Thanks.
Who is Participating?
If you don't like frames (as I) try using session cookies and flashvars to control your animation.

// If no session cookie named showanimation exists create one
// with a true value. Else set the the value to false
if(!isset($showanimation)){ $showanimation="true";}
else{ $showanimation="false";}

Add the following to the tags including your flash movie on the page:
Object tag:
<PARAM NAME=FlashVars VALUE="playanimation=<?=$showanimation ?>">

Embed tag:
<EMBED src="yourflashfile.swf" FlashVars="playanimation=<?=$showanimation ?>"
... (other parameters)></EMBED>

In your flash movie add something like this:
  // Play the animation
 // Don't

Best, Jakob E
I like flash for it's seamless presentation..and having a flash movie load with each new page seems to me..contrary to what flash is good for.
because you're using it as a menu there are two easy ways to make it just sit there and not re-load.
1. put the flash movie and the content below the movie in separate frames
 (the most appropriate solution considering the approach you have taken..note.. the variables you are passing in the html to set the buttons to match the page will no longer be needed)
2.include the bottom content in the flash movie so your site is a one flash movie (my favoured option) but 1. will work just as well.


Oh my! I hate to be critical, but that flash thing is really rather busy! Anyway you didn't come here to discuss that but to solve your problem.

As zeffer says, frames is one solution and putting the content at the bottom into the flash movie itself would also work.

The alternative is to have some variable written by the php which controls what's going on in the flash movie - so you could read in a value from the params bit of your html definition which would tell your movie whether to do the whole "slide the boxes around" bit - and to be honest, you could even turn off the "loading" bit with this as presumably it will be cached by this point.

Jakob, few questions...

Do you do this all on a php page or a html  page? Where exactly do you put the code...in the head tag? I'm having a similar issue at http://andrewhoffmandesign.com/evolved

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.