3 Replies Latest reply on Sep 19, 2006 6:34 AM by Improvise

    Preloader only to play once.

      Hi there...

      This is kinda' hard to explain but I'll try to do it as best I can...

      I have a preloader and once it has loaded it goes to the next scene 'index'... From there on I have a 4 links which go to HTML pages.

      What I want... Or would like to create is... When you click back on your web browser that instead of the flash starting again from the preloader scene it goes straight to the 'index' scene instead.

      So the Flash needs to determine that the user has already visited the page and has loaded the flash, thus removing the need for the preloader to show again.

      Is this at all possible... and if so could anyone please point me in the direction of a tutorial and/or help me with the script.

      Thanks in advance.

      - Chris

      PS - I'm rather new with Flash, and completely clueless when it comes to actionscript... Sorry.
        • 1. Re: Preloader only to play once.
          TimSymons Level 1
          In the first frame of the preloader, check to see if

          getBytesLoaded() == getTotalBytes()

          If it does, then jump to your index scene. If not, then continue with the preloader.

          You may have to put some empty frames in front of your preloader to give the movie time to register the size.

          • 2. Re: Preloader only to play once.
            Improvise Level 1
            Ah but here lies another problem or opportunity (which ever way you look at it)

            I have 3 scenes... (Preloader) (Preloader-Index) (Index)

            The first time you visit the page, all three scenes should play in order (obviously), But say you navigate away from the page... Then decide to click 'back' in the browser and return to the swf... I only want the 3rd scene (Index) to play now, since the Flash file is already loaded, thus removing the need for the first two scenes to play.

            Is there a way for Flash to know that you already have the swf cached and downloaded, thus telling it to play straight from the third scene?

            I hope I explained that well enough, lol.

            Thanks in advance.
            - Chris
            • 3. Preloader only to play once.
              Improvise Level 1
              Quick thought... Would something like this work... And if so, what am I doing wrong?