4 Replies Latest reply on Feb 23, 2007 7:54 AM by Newsgroup_User

    Repeat with doesn't work

    Opera Rat Level 1
      I always get this wrong. You may not recognize some of the code but you can figure it out. What is supposed to happen is that while the music is playing it looks at the time elapsed and changes frames when certain cuepoints are met. Say that gCuelist = [1000, 2000, 3000, 4000, 5000, 6000, 7000] gPage is the frame. So frame 1 is page 1.

      When I run this I get and error : list expected for handler. but I see the correct list in the debugger. One problem is that the debugger says k = 7 right from the start rather than starting with one and changing as a time is reached. Can anyone see my problem?

      global gCuelist, gPage

      on ChangePage

      repeat with k = 1 to 7
      if dmm_CDExtGetElapsedTrackMillisec() >= getAt(gCuelist,k) and dmm_CDExtGetElapsedTrackMillisec() < \ getAt(gCuelist,k+1) then gPage = k
      end repeat
      go to frame gPage

      end if