3 Replies Latest reply on Nov 16, 2006 4:22 AM by shikozel

    reload or refresh?

      Does anyone know how to detect if a user hits refresh/reload?
        • 1. Re: reload or refresh?
          shikozel Level 1
          many ways to do it. one way is sending a variable to your flash movie. you'll recieve this variable in in the _root timeline everytime the page load or re-load
          • 2. Re: reload or refresh?
            rugner Level 1
            Thank you, but I don't see how that helps unless, you recommending a variable that is linked to the time or a random number so I can tell if it changed. That seems like a bit much.
            What would be another way?
            The reason I am having an issue is that when hitting reload/refresh Firefox does hit the _root.onLoad function but IE doesn't. I need to reset some variables if it is pressed. hmmmm?
            • 3. Re: reload or refresh?
              shikozel Level 1
              I hear you. I know IE has problem with the cached. It doesnt really refresh the flash movie. I would give this solution a try. Send a variable when the movie load:

              <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
              codebase=" http://macromedia.com/cabs/swflash.cab#version=6,0,0,0"
              ID=flaMovie WIDTH=250 HEIGHT=250>
              <PARAM NAME=movie VALUE="flaMovie.swf">
              <PARAM NAME=FlashVars VALUE="start=true>
              <PARAM NAME=quality VALUE=medium>
              <PARAM NAME=bgcolor VALUE=#99CC33>
              <EMBED src="flaMovie.swf"
              bgcolor=#99CC33 WIDTH=250 HEIGHT=250

              this will send var start=true ( true is a string not a boolean). and when you get this value you know the page just loaded

              Another solution could be:
              movie that loads your movieinto itself, then when you want to
              every time the movie start you delete the whole thing you by sending a message to _level0 to delete _levelWhatever.

              hope this help