4 Replies Latest reply on Nov 25, 2008 2:26 PM by Newsgroup_User

    Scripting for Interactive buttons

    CJ KY
      I've got another situation I'm trying to work through. I've solved the PDF problem but now I'm trying to link my interactive buttons to go to the individual files and I can't get them to work. I thought that for the script I just had to say (for mouseUp) - go to "Chapter 1" - I have several markers (Chapter 1 - 15) and I thought I just had to name the individual marker in lingo and then when you played back the movie you could click on the buttons and it would go to the marker you named in the script. I've tried it as a Sprite Script and as a Cast member script - I can't get either to work. What else should I try?
        • 1. Re: Scripting for Interactive buttons
          Level 7
          That sounds like you are doing it correctly, but you were not real
          specific about what you did, so I may be misunderstanding.

          on mouseUp me
          go "Chapter 1"
          end

          That will jump to the frame that has the label "Chapter 1"

          If it does not work, please let us know what is not working about it.
          Error messages, etc...
          • 2. Re: Scripting for Interactive buttons
            CJ KY Level 1
            Hi Mike,

            What I have is the first screen you see has several buttons on it that I am trying to link to go to the PDF files (opening up a different screen). I marked all the frames and placed the PDF that corresponds to it at that frame in a channel. All that;s left is to get the linking correct. That's also where I'm having a problem. I will select the button and then right click Cast Member Script - when the script window comes up I do this:

            on mouseUp
            go to"Chapter 1"
            end

            This is on the button labeled Chapter 1 and I am trying to get it to go to the PDF that is a cast member at the frame with the marker named Chapter 1. It doesn't work. I've triple checked my spelling/case sensitivity, everything I can think of and it still doesn't work.

            I am just learning the program so I'm sure there's a step I'm overlooking but I just don't know what it is. What am I missing?

            I put a frame pause so that the movie wouldn't play past the first scene without the end user clicking on one of the buttons to go to the next section. The pause is working but is that interfering with the other commands I'm trying to do?

            Thanks for your help
            • 3. Re: Scripting for Interactive buttons
              Level 7
              CJ KY wrote:
              > What I have is the first screen you see has several buttons on it
              > that I am trying to link to go to the PDF files (opening up a
              > different screen). I marked all the frames and placed the PDF that
              > corresponds to it at that frame in a channel. All that;s left is to
              > get the linking correct. That's also where I'm having a problem. I
              > will select the button and then right click Cast Member Script - when
              > the script window comes up I do this:

              Don't use cast member scripts. They are "flaky". If you use the following
              behaviour, you can drag it onto anything and it will present you with a
              choice of where to go:

              -----------------------------
              property destination

              on mouseUp
              go destination
              end mouseUp

              on getPropertyDescriptionList
              b=[]
              x=[:]
              s=the labelList
              n=s.line.count
              repeat with i=1 to n
              add b,s.line
              end repeat
              x=[#destination: [#default: (the frameLabel), #format: #string, #comment:
              "Go to ",#range: b]]
              return x
              end getPDL
              ----------------------------

              (The advantage of creating the list yourself instead of using
              #format:#marker is that you can choose which items to include in the list;
              for example you might use an "x" at the beginning of a marker name you don't
              want to be able to go to, like in a transition.)

              HTH

              Andrew


              • 4. Re: Scripting for Interactive buttons
                Level 7
                > I put a frame pause so that the movie wouldn't play past the first scene
                > without the end user clicking on one of the buttons to go to the next section.
                > The pause is working but is that interfering with the other commands I'm trying
                > to do?

                Along with Andrew's suggestion, don't *EVER* use the tempo channel to
                stop the playhead. Instead you should be adding a script to the
                frameScript channel along the lines of:
                --
                on exitFrame me
                go to the frame
                end