This content has been marked as final. Show 4 replies
"krame18" <email@example.com> wrote in message
>I searched the forums and wasn't able to find anything on this, so
> didn't just miss it.
> I am working on a site that has a flash header in an include page. Can
> someone enlighten me on actionscript code to make the movie not reload at
> beginning on each new page load? Right now, everytime somebody goes to a
> page, it starts at the beginning of the movie.
Take a look at sharedobject
Thanks for the link. I went through their SharedObjects, but not sure how to implement it for just a move. I don't want the movie to have to stop and then a click start the movie, I just want it to load and then restart upon completion of the movie.
SharedObject allows you store information on the user's computer. So the basic idea is you your store a variable hasPlayed=true
var so = new SharedObject();
so.data.hasPlayed = true;
The only problem is this will prevent the movie from ever playing again, even if the user ends the session. You could use the Date() class to compare when the last time the user was at the site, and if was longer than a day, play(), else, stop().
Another alternative is to pass in a variable in the HTML embed tags with the FlashVar param:
If you know what you are doing with some serverside scripting, you can pass along a session variable in the FlashVars as to wether to play or not.
Thanks, that helped quite a bit. Just change the stop() to something like gotoAndPlay("label").