3 Replies Latest reply on Dec 28, 2006 10:29 AM by FasterPastor

    Markers and Framelabels

    Buzz_Liteyer
      Enlighten me on how to navigate to a 'marker' by specifying just the first character in the 'marker' name. I have several question markers: Q1, Q2, Q3, Q4, ... (There are other markers in-between these markers: 'start', 'pdfs', 'movie', ....) At certain times I want the NEXT button to simply go the the next "Q#" marker skipping the other markers. I've seen it done before - just can't remember where.
      Thx
        • 1. Markers and Framelabels
          FasterPastor Level 1
          Remember that the marker() function can use integer as an argument in addition to string. When you look up "marker()" in the Help file or your Lingo dictionary, can you not see what you need?

          If not, you might look into a couple of things:

          (1) You could evaluate all markers before and/or after the current frame (using < and >, along with the integer method mentioned above), and also evaluate each marker for whether its name starts with "Q" by using the char[1] method.

          (2) Look into the do command. From the Lingo dictionary, The do command evaluates stringExpression and executes the result as a Lingo statement. This command is useful for evaluating expressions that the user has typed and for executing commands stored in string variables, fields, arrays, and files.
          • 2. Markers and Framelabels
            FasterPastor Level 1
            Consider also, that there is a built in function for obtaining a list of all the markers in the score. The feature is global, and the list is of the format: frameNumber: "markerName"

            This statement displays the list of markers in the Message window:

            put the markerlist
            -- [1: "Opening Credits", 15: "Main Menu", 26: "Closing Credits"]

            You could write a function of your own for iterating through this list, and navigating accordingly, or for otherwise parsing this list to get done what you need done.
            • 3. Markers and Framelabels
              FasterPastor Level 1
              Here are some examples that should help:

              Put the first behavior on a button called "Previous Question", and the second on a button called "Next Question":