April 27th, 2012, 02:36 PM
Play Flash animation once on main page only
Any help would be greatly appreciated!
I am setting up a webshop using opencart and I have replaced the logo with my Flash animation (created using CS5.5 trial & Act Script 3).
The problem I am getting is when ever the a link is clicked the page reloads along with the header & logo which plays again, with each of these clicks!
How can I make the logo just play once when someone visits the front page website.com/index.php ?
Please, any advice would be terrific.
April 29th, 2012, 01:37 PM
... help NEEDED - BUMP
... if anyone can suggest it would be great ! ! !
Have tried everything I can and every snippet of code I have found via google ...
still no joy
Hi, you can use a SharedObject to do what you are after. You can think of it as a Flash based cookie. So on when the page is loaded you check if the SharedObject is set, if it is then you skip to the end of the animation, if it is not set then you just play it from the start. This is a rough version:
var header_so:SharedObject = SharedObject.getLocal("site_header");
// Skip to end of animation, you probably need to tailor this bit for your animation.
// Not viewed it yet so set the SO and continue the animation.
header_so.data.already_viewed = true;
Quis custodiet ipsos custodes?