CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2008
    Posts
    3

    JavaScript / Flash Help

    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>

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: JavaScript / Flash Help

    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.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Dec 2008
    Posts
    3

    Re: JavaScript / Flash Help

    Ok, I've heard of that. Can you give me a code example? I'm sorry I'm very new to this stuff.

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: JavaScript / Flash Help

    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
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured