9 Replies Latest reply on Jul 17, 2008 10:17 PM by kglad

    onEnterFrame() freezes on a specific frame

    erlendbv
      I have an array textFromXml, containing text and start position from an imported XML. These will be loaded when reaching the corresponding time in a movieclip placeholder (currentframe divided on framerate).

      I have the AS2-code attached.

      This gives an output looking like this;

      (...)
      i = 0
      No match; 0.0666666666666667 does not match 0.1
      i = 1
      No match; 0.0666666666666667 does not match 1.2
      i = 2
      No match; 0.0666666666666667 does not match 8.5
      i = 3
      No match; 0.0666666666666667 does not match 13.5
      i = 4
      No match; 0.0666666666666667 does not match 18.5
      i = 5
      No match; 0.0666666666666667 does not match 23.5
      i = 6
      No match; 0.0666666666666667 does not match 28.5
      i = 7
      No match; 0.0666666666666667 does not match 33.0
      i = 0
      MATCH! Text: This is the text from the XML.
      i = 1
      No match; 0.1 does not match 1.2
      i = 2
      No match; 0.1 does not match 8.5
      i = 3
      No match; 0.1 does not match 13.5
      i = 4
      No match; 0.1 does not match 18.5
      i = 5
      No match; 0.1 does not match 23.5
      i = 6
      No match; 0.1 does not match 28.5
      i = 7
      No match; 0.1 does not match 33.0
      i = 0
      (...)


      However, one strange problem. The loop freezes at 1.23333333333333 secs, i.e. at the 37th frame, and just repeats the check at this frame over and over...

      i = 0
      No match; 1.23333333333333 does not match 0.1
      i = 1
      No match; 1.23333333333333 does not match 1.2
      i = 2
      No match; 1.23333333333333 does not match 8.5
      i = 3
      No match; 1.23333333333333 does not match 13.5
      i = 4
      No match; 1.23333333333333 does not match 18.5
      i = 5
      No match; 1.23333333333333 does not match 23.5
      i = 6
      No match; 1.23333333333333 does not match 28.5
      i = 7
      No match; 1.23333333333333 does not match 33.0


      I've tried dividing on a different number, but still the same frame causes the error. The imported SWF is 900 frames, and keeps running without problems, so it's only the onEnterFrame-function that gets a hickup. I don't understand why it would freeze here. Any suggestions?
      __________