3 Replies Latest reply on Feb 20, 2009 12:20 PM by Loveanie

    No retart on refresh

    alan arthur
      Hi, everyone.

      This is a very strange question, I promise.

      For years, I've been trying to design animated homepages that --do not-- run when refreshed or when you return to the home page. I've gone through hoops simulating it, but in many cases, I've had to open follow-on pages in a new window to avoid making the visitor sit through the home page animation time-after-time.

      Well, it seems I've finally done it. I wish I knew what I did!

      I recently upgraded to CS4 and recompiled two separate sites as Flash 8/Actionscript 2 (their legacy environment). Publish settings appear to be identical in both.

      But this one replays each refresh:


      On the other hand, this one runs only once, which is what I really wanted:


      Open them, then hit the "refresh" button on IE7. The first replays, the second doesn't.

      Does anyone have any idea what I did to make the second one work the way I wanted?

      Any insight appreciated!

      Here's the Javascript code that launches them:

      For the one that refreshes:

      document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="800" height="270" title="arena">')
      document.write('<param name="movie" value="arena.swf" />')
      document.write('<param name="quality" value="high" />')
      document.write('<param name="bgcolor" value ="#800000"')
      document.write('<embed src="arena.swf" quality="high" pluginspage=" http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="270"></embed>')

      For the one that doesn't:

      document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="862" height="600" title="banner">')
      document.write('<param name="movie" value="plexicomm2.swf" />')
      document.write('<param name="quality" value="high" />')
      document.write('<param name="bgcolor" value ="white"')
      document.write('<embed src="plexicomm2.swf" quality="high" pluginspage=" http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="862" height="600"></embed>')

      I can't find any meaningful differences anywhere <sigh>

        • 1. No retart on refresh
          Ned Murphy Adobe Community Professional & MVP
          Neither can I, the second one replays when I refresh.
          • 2. Re: No retart on refresh
            alan arthur Level 1
            Thanks, Ned

            I tested it further. It refreshes in Firefox and Safari, but not in IE 7.
            Very strange.

            Would be a nice feature to add to Flash: Play once per session.
            • 3. Re: No retart on refresh
              Loveanie Level 1
              What you could do is use SharedObjects (if you don't know about it, it's like the cookies, but for Flash).

              You could do something like that:
              var so:SharedObject = SharedObject.getLocal("visited");
              if (so.data.visited) { // the page has been visited before
              gotoAndStop("The frame where the animation ends");
              else {
              so.data.visited = true;

              The problem with that is that the animation will only play the first time the user visits the page, not on every visit... But maybe, if you have time, you can try to work with it and find a way to do it...