9 Replies Latest reply on May 3, 2006 8:10 PM by kglad

    loading external jpeg

    hushhurt Level 1
      hello, i am new to actionscript, so please bear with me. I am trying to load an external jpeg list and having issues. here is the code:

      i am not sure what the issue is - the first slide displays fine, but everytime i click the next button, it just flashes and shows the first slide again.

      help!

      david
        • 1. Re: loading external jpeg
          kglad Adobe Community Professional & MVP
          what's trace(slideInfoLV.totalFrames) in your nextSlideBtn reveal?
          • 2. Re: loading external jpeg
            hushhurt Level 1
            it says it is undefind.
            i checked the text file, which is in the "vars" folder that is in the same folder as the swf file - and it states "totalFrames=10"

            i'm still stuck here.
            • 3. Re: loading external jpeg
              kglad Adobe Community Professional & MVP
              use an onLoad handler to see if your text file is loading.
              • 4. Re: loading external jpeg
                hushhurt Level 1
                ok - so i did an onLoad handler: slideInfoLV.onLoad = handleLoad;
                function handleLoad (success) {
                if (success) {
                trace ("loaded info");
                }
                else {
                trace ("not loaded info")
                }
                }
                handleLoad();

                and it traced "not loaded info"
                i have the vars folder in the same directory as my published .swf file.
                i had this problem earilier with an external css style sheet - is it my comp?
                • 5. Re: loading external jpeg
                  kglad Adobe Community Professional & MVP
                  is your html file in the same directory as your swf file?
                  • 6. Re: loading external jpeg
                    hushhurt Level 1
                    ok - this is the last stab i'm gonna have at it. everything is in the same directory as my swf file.
                    on my "_level0.myMCL.loadClip ("frames/frames" + curFrameNum + ".jpg", this.framesMC);" line. if i replace the var "curFrameNum" and manualy place the jpg name i.e. frames1.jpg, frames2.jpg, etc. it will display each jpg.

                    but when i change the "var curFrameNum:Number = 0;" line to read "= 1" or "=2" it give me a blank screen.

                    does this help at all - i feel like im running around in circles
                    • 7. Re: loading external jpeg
                      kglad Adobe Community Professional & MVP
                      well, everything isn't in the same folder as your swf file. your html and swf files are in a folder and your jpg's are in a subfolder called frames, correct? and your text file (which is the problem) should be located in another subfolder called vars. where is it located?

                      • 8. Re: loading external jpeg
                        hushhurt Level 1
                        correct - they are in sub folders. the pictures are in a subfolder label "frames" and the text file is in a subfolder labeled "vars" I thought it was an higharchy issue with subfolders - so i ommited the "vars" in "vars/slide_info.txt" and placed the .txt file directly into the folder with my published swf.

                        should i try and place all my files directly into the folder where my published swf is? (including all the jpgs)
                        • 9. Re: loading external jpeg
                          kglad Adobe Community Professional & MVP
                          it's not necessary to use the same folder for everything, but it is necessary to use the correct path when things are in a different folder.

                          but make sure your vars/slide_info.txt contains the info it should contain and make sure it looks like the following:

                          &totalFrames=10&