# Swap swf on browser refresh

**URL:** <https://forum.kirupa.com/t/swap-swf-on-browser-refresh/326667>\
**Category:** Uncategorized\
**Created:** [January 3, 2012, 10:15pm UTC](https://forum.kirupa.com/t/swap-swf-on-browser-refresh/326667 "2012-01-03T22:15:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![padmaaleti](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@padmaaleti](https://forum.kirupa.com/u/padmaaleti)\
**Post date:** [January 3, 2012, 10:15pm UTC](https://forum.kirupa.com/t/swap-swf-on-browser-refresh/326667/1 "2012-01-03T22:15:39Z")

</div>

**[COLOR=#ff0000]Actionscript 2 (Flash Professional CS5) [/COLOR]  
 I am designing a website with a Flash banner animation**on homepage. I would like the animation to play only once per session.\*\* When the user refreshes the browser \*\*(or when navigates through other pages and comes back to homepage), the**swf file should be replaced with a swf/jpg that’s static**.  
I do not want to try shared objects for other compatibility issues.  
Please help me with either **“div swap” or “swf swap” on page refresh or reload** …all i need is to **let the movie play only once per session**. Any code that could stop the movie from annoying the user by replaying every time on refresh/reload.  
And this is an **as2(Flash Professional CS5) file that’s embedded in html page which will be eventually developed into an aspx page. I appreciate any javascript code that helps solve the issue…**. **NO PHP PLEASE!!**
