3 Replies Latest reply on Dec 8, 2007 10:34 AM by mindforge

    Student Project - Slide Show

    mindforge Level 1
      Hi,

      I've been reading through the Director MX User Guide and Help function but I'm still not able to get my Play, Pause and Stop buttons to work right. Here's what I'm trying to do:

      I have a slide presentation that I made in Director MX for my class project. There are 12 slides in the presentation. Each slide has a thumbnail in the left navigation panel so you can jump from slide to slide. I have this part worked out. What I can't figure out is the following:

      1. How do I get play to function like a real Play > button?
      2. How do I pause play once the slide presentation has started (i.e. get the Pause | | button to function like a pause button)?
      3. How do I resume play once the slide presentation has been paused or stopped (using the Play > button)?
      4, How do I get Stop to either return to the first frame or to the previous marker?

      Thank you for your help,

      Mindforge
        • 1. Re: Student Project - Slide Show
          Level 7
          Hi Mindforge,

          Here's a behavior that will pause/resume by actually holding the playback head in
          the frame. Attach it to a sprite:
          property pPauseVariable

          on beginSprite me
          pPauseVariable = 1
          end

          on mouseUp me
          pPauseVariable = not(pPauseVariable)
          end

          on exitFrame
          if pPauseVariable = 0 then
          go the frame
          end if
          end

          If in a paused state, the variable pPauseVariable is 0, otherwise 1. When you
          click, the value toggles between 1 and 0.

          To jump to the next marker:
          on mouseUp
          go next
          end

          To jump to the previous marker:
          on mouseUp
          go previous
          end
          To jump to a specific marker

          To jump to the next marker:
          on mouseUp
          go "markerName"
          end

          you can use:
          go to 10
          to jump to frame 10.
          BUT DON'T!!!. It is bad to jump to a frame number. rather link to a marker. You can
          always insert or delete frames and if you link to a frame number, the script will
          become buggy.

          Hope that answers your question.

          regards
          Dean

          Director Lecturer / Consultant / Director Enthusiast
          http://www.fbe.unsw.edu.au/learning/director
          http://www.multimediacreative.com.au
          email: d.utian@unsw.edu.au

          • 2. Re: Student Project - Slide Show
            ARD_Guest_User
            Hi,

            I really appreciate your help. The feedback I got on my prototype was really good. I have this week to add the Play control functionality. The Lingo scripts you provided really help.

            All the best,

            Mindforge
            • 3. Re: Student Project - Slide Show
              mindforge Level 1
              Hi,

              I've implemented the "Pause" functionality and "Jump to Marker" navigation with no problem.

              For the "Stop" button I used the following code.

              property sStopVariable

              on beginSprite me
              sStopVariable = 1
              end

              on mouseUp me
              sStopVariable = not(sStopVariable)
              end

              on exitFrame
              if sStopVariable = 0 then
              go loop
              end if
              end

              This sends the Play head to the Marker at the beginning of the current Sprite and 'loops" on the Marker. If I click again on the Stop button it will go back one Marker at a time. The problem I have is getting it out of the Looping mode.

              Is there a script for my Play button that will break the Loop set-up by the Stop script I've written?

              Basically, I'm trying to create a Play, Stop and Pause function.

              Thanks for your help,

              Mindforge