3 Replies Latest reply on May 20, 2007 4:56 AM by rockfiend

    goto end of MC if MC has already played

    rockfiend
      Hello,

      I have a short intro that loads the components of my "home" section of the page in a visually pleasing way so it stops at the end with my navigation bar working and active. I want this to play when someone first visits the site, but if they then return to home from another page, i do not want the intro to play again. if they close the site completely then return to it by typing the URL in the address bar, i would like the intro to play on load again (and not play when they navigate back to home from within the site)

      In my flash buttons on my other pages, is there a way of telling flash to jump to the last frame in the timeline of the intro, thus skipping the intro? or someway of treating the intro playing as an event and recording that event somehow and adding some kind of "if" statement at the beginning of the intro?

      please be specific with advice if possible, i dont really know what i am doing yet. thanks.
        • 1. Re: goto end of MC if MC has already played
          Level 7
          rockfiend <webforumsuser@macromedia.com> wrote:
          > Hello,
          >
          > I have a short intro that loads the components of my "home" section
          > of the page in a visually pleasing way so it stops at the end with my
          > navigation bar working and active. I want this to play when someone
          > first visits the site, but if they then return to home from another
          > page, i do not want the intro to play again. if they close the site
          > completely then return to it by typing the URL in the address bar, i
          > would like the intro to play on load again (and not play when they
          > navigate back to home from within the site)
          >
          > In my flash buttons on my other pages, is there a way of telling
          > flash to jump to the last frame in the timeline of the intro, thus
          > skipping the intro? or someway of treating the intro playing as an
          > event and recording that event somehow and adding some kind of "if"
          > statement at the beginning of the intro?
          >
          > please be specific with advice if possible, i dont really know what i
          > am doing yet. thanks.

          You already had the right idea.
          Just set some flag in the last frame of your intro (introDone = true;),
          and check that flag in the first frame:
          if(introDone){
          myIntroMC.gotoAndStop(this._totalframes);
          }

          --
          Freundliche Grüße,
          Franz Marksteiner


          • 2. Re: goto end of MC if MC has already played
            rockfiend Level 1
            thanks, I think that will get me there in the end, but how do I keep that flag stored? when i leave index.html and then return to it, it plays again because the flag is not saved. is there a way of saving it just for that persons visit?
            thanks
            • 3. Re: goto end of MC if MC has already played
              rockfiend Level 1
              hmmm, just thought of something else interesting

              can i do an "if url = ....index.html gotoAndStop(this._totalframes)

              because the only time the url would have index.html in it would be if navigated to from one of the other pages... not sure how to impliment this though...

              if(URL == "www.whateversite.com\index.html")
              {gotoAndStop(this._totalframes);
              }

              this looks good, but it is not working...
              thanks