I have just put together a website for my employer which has a flash movie that plays as soon as you land on the homepage. I want that movie to only play once, so when the visitor goes to another page then goes back to the homepage the movie will not play again. I have applied the following LSO script to the flash movie to create a sort of flash cookie stored on the visitors computer. It works fine in Internet explorer and Safari, but for some reason there's a problem in Firefox. When you go back to the homepage, instead of going to the last frame as scripted gotoAndStop(_totalframes); it stops at a random point roughly half way through the movie. I have no idea why this is happening, does anyone have any suggestions how to resolve the problem?
// create a Shared Object
var my_so:SharedObject = SharedObject.getLocal("animationPlayed");
// if it's the first time here, i.e, <em>played</em> hasn't been set already,
// see the animation
if (my_so.data.played == undefined)
// set played to true
my_so.data.played = true;
my_so.flush(); // write the data
// you've already watched the animation before
// go to the last frame
// for testing purpose, clear the Shared Object, i.e.,
// pretend you haven't watched the animation already
clearLSO_btn.onRelease = function()
Also, how long will this flash cookie be stored on the visitors computer? Can you suggest the script I can use to clear this data after a certain period of time?
normally that indicates a swf has not completely loaded. i would expect, if you cleared your other browser's cache, you would see the same issue when clicking back and forth quickly enough.