2 Replies Latest reply on Apr 25, 2006 8:28 AM by ShootingStar

    Calling Images & dynamic text not incrementing

    ShootingStar
      Greetings: A second set of eyes here would be helpful. I am calling external images and test files from a subfolder in my Flash folder. For some reason only the first image and text file are showing up. Help and/or suggestions appreciated. Code below:
      ---------------------------------
      onEnterFrame
      displayNum = _global.displayImage
      if (displayNum<=_global.imageEnd) {
      trace(_global.imageEnd);
      trace(displayNum);
      loadMovie("/Flash/support_photos_text/"+displayNum+".jpg", "slideHolder");
      loadVariablesNum("/Flash/support_photos_text/"+displayNum+".txt", 1);
      ++_global.displayImage
      }
      else {
      _global.displayImage = 1
      displayNum = _global.displayImage
      trace(_global.imageEnd);
      trace(displayNum);
      loadMovie("/Flash/support_photos_text/"+displayNum+".jpg", "slideHolder");
      loadVariablesNum("/Flash/support_photos_text/"+displayNum+".txt", 1);
      ++_global.displayImage
      }
      ----------------------------
      help appreciated.

      Thanks in advance!
        • 1. Calling Images &amp; dynamic text not incrementing
          Xithis Level 1
          You are reseting the _global.displayImage = 1 everytime so only the first image and text would show. Get rid of that line and it should work.

          Why? because the first if part of the function I think is being treated as a string and therefore its automatically going to the else statement. Change the trace calls to differenciate the functions and see if that is happening.

          so do something like

          if (Number(display) <= _global.imageend)

          I think that might help.
          • 2. Re: Calling Images &amp; dynamic text not incrementing
            ShootingStar Level 1
            That did seem to keep it from looping on the first image. Thanks!

            What I really need it to do however is to repeat when it comes to the last image. I do have a text file where I am listing the last image named (/Flash/support_photos_text/image-count.txt) that contains (totalImages=53& .

            How and where should I enter code to grab this info and stuff it in my _global.imageEnd variable? Should I grab this info in the initial flash movie that is calling this one? That sort of makes sense to me. You help is greatly appreciated. Code as is now below:
            ------------------------------
            onEnterFrame
            displayNum = _global.displayImage
            if (Number(display) <= _global.imageend) {
            trace(_global.imageEnd);
            trace(displayNum);
            loadMovie("/Flash/support_photos_text/"+displayNum+".jpg", "slideHolder");
            loadVariablesNum("/Flash/support_photos_text/"+displayNum+".txt", 1);
            ++_global.displayImage
            }
            else {
            _global.displayImage = 1
            displayNum = _global.displayImage
            trace(_global.imageEnd);
            trace(displayNum);
            loadMovie("/Flash/support_photos_text/"+displayNum+".jpg", "slideHolder");
            loadVariablesNum("/Flash/support_photos_text/"+displayNum+".txt", 1);
            ++_global.displayImage
            }
            ---------------------

            Thanks,

            Rip