Click to See Complete Forum and Search --> : JavaScript / Flash Help


BlackKnife
December 31st, 2008, 12:47 AM
I have two sets flash and Java Script that I need to have switch between each other each time the page is refreshed. How can I do that or can I?

Please give me an example in code.

Here are the two sets of code. They just need to switch from one to the other every time someone refreshes the page.

<script type="text/javascript">
var sLinkURL = "http://www.spinaldoc.org";
var sSmallSWF = "http://www.clintonnc.com/media/kosterman/right_small.swf";
var sSmallImage = "http://www.clintonnc.com/media/kosterman/small_image.swf";
var sLargeSWF = "http://www.clintonnc.com/media/kosterman/right_big.swf";
var sLargeImage = "http://www.clintonnc.com/media/kosterman/large_image.swf";
</script><script type="text/javascript" src="http://www.clintonnc.com/media/kosterman/rightcurl.js"></script>

<script type="text/javascript">
var sLinkURL = "http://www.scpfc.org";
var sSmallSWF = "http://www.clintonnc.com/media/pfc/right_small.swf";
var sSmallImage = "http://www.clintonnc.com/media/pfc/small_image.swf";
var sLargeSWF = "http://www.clintonnc.com/media/pfc/right_big.swf";
var sLargeImage = "http://www.clintonnc.com/media/pfc/large_image.swf";
</script><script type="text/javascript" src="http://www.clintonnc.com/media/pfc/rightcurl.js"></script>

PeejAvery
December 31st, 2008, 08:50 AM
Just create a cookie that stores one number type variable. If the value is 1, show the first example and make the variable equal to 2. If the value is 2, show the second example and make the value equal to 1.

BlackKnife
December 31st, 2008, 10:04 AM
Ok, I've heard of that. Can you give me a code example? I'm sorry I'm very new to this stuff.

PeejAvery
December 31st, 2008, 11:34 AM
You know Google will return results for you so that you don't have to wait for people to respond in this thread.

http://www.w3schools.com/JS/js_cookies.asp