7 Replies Latest reply on May 26, 2008 2:45 PM by kglad

    Script running slowly...

    GerryIsHere Level 1
      Hi there!

      The alert message "A script in this movie is causing Flash Player to run slowly. If it continues to play your computer may become unresponsive. Do you want to abort the script?" is really driving me mad.
      Everything was going well.

      It happened suddenly when I published my movie for about the hundreth time just after adding a script.

      I tried to re-publish with the new script removed and I still got the same message!
      I verified all the scripts my movie contains and there's no error in the scripting
      (at least as Check syntax tells me...)

      In the publishing window, I can see the whole movie playing very quickly without a stop even if each concerned keyframe has a stop(); in it.

      If I abort the script, the movie continues to run and at the end of the graphical display of the frames, I can see a lot of "ghost" frames (about twenty) and the panel indicates a preload of about 3 000 000 frames !!!!!
      If I don't abort the script, the graphical display and the Preload quantity is normal (about 270 frames).

      Does anybody has an idea of what is happening?

      Many thanks for your help.
        • 1. Re: Script running slowly...
          What kind of script did you add? Sometimes Flash does that warning when it hasn't got any status messages/data for a certain period of time..
          • 2. Re: Script running slowly...
            GerryIsHere Level 1
            Thanks for replying!

            Sorry for the delay...
            I'm an old man and I was sick these days...

            The script I added is very simple and clean: it loads arrays to populate a new ComboBox and a Listener to drive this ComboBox.
            Nothing very special here.

            The Movie contains 23 ComboBoxes with similar scripts.
            All of the ComboBoxes are set invisible by default and some of them are called on demand depending the Frame in which we work.

            Very simple... indeed!

            Remark: despite the warning, if I DON'T abort the script everything is working fine and operations are flashy. The Movie becomes erratic if I abort the script and then nothing is working !!!!!
            Problem is the warning doesn't indicate WHICH script is involved and it is annoying.
            Using the Debugger is very complex for me and doesn't do an analysis of the Movie scripting...

            • 3. Re: Script running slowly...
              kglad Adobe Community Professional & MVP
              that warning is usually the result of a for-loop or while-loop that's taking more than 15 seconds to execute. for example, looping more than 10,000 times may start to cause problems on some computers.
              • 4. Re: Script running slowly...
                GerryIsHere Level 1
                Thanks kglad for your reply.

                Of course, the first things I verified were the for statements.
                But everything was fine.

                I finally found the mistake:
                The code below wasn't in the first frame! it was in frame 10 of the main Timeline.
                After I placed it in the first frame the movie worked nice.

                I found the reason, but could you explain why a misplacing of this code has such consequences?
                With your explanation, other users will have a well documented answer to this problem...

                Best regards,


                • 5. Re: Script running slowly...
                  kglad Adobe Community Professional & MVP
                  that code wouldn't cause a timeout problem.
                  • 6. Re: Script running slowly...
                    GerryIsHere Level 1
                    Of course, the code itself wouldn't, but what about its position in the Timeline?
                    • 7. Re: Script running slowly...
                      kglad Adobe Community Professional & MVP
                      the code's position is not relevant to any timeout issue. something else is/was causing your problem.