4 Replies Latest reply on Apr 26, 2008 4:28 PM by shariha

    Script Help

    shariha Level 1
      I am having the hardest time with director I'm not sure if it's due to something I'm missing or what. But any websites with scripts would be a big help. My movie when I test it plays but I don't want it to play until mouse click.

      Please help asap
        • 1. Re: Script Help
          shariha Level 1
          I found a script. For anyone who might have this problem in the future.

          -- DESCRIPTION --

          on getBehaviorDescription me
          return \
          "HOLD ON CURRENT FRAME" & RETURN & RETURN & \
          "Drop this behavior into the Script Channel of the Score or onto the Stage in order to keep the playback head in the current frame." & RETURN & RETURN & \
          "PARAMETERS: None"
          end getBehaviorDescription


          on getBehaviorTooltip me
          return \
          "Frame behavior. " & \
          "Holds the playback head still."
          end getBehaviorTooltip



          -- HISTORY --

          -- 3 November, written for the D7 Behaviors Palette by James Newton
          -- 5 January 2000: updated to D8 <km>



          on exitFrame me
          go the frame
          end exitFrame


          on isOKToAttach (me, aSpriteType, aSpriteNum)

          tIsOk = 0
          if aSpriteType = #script then
          tIsOK = 1
          end if

          return(tIsOK)
          end on
          • 2. Script Help
            SafariTECH Level 1
            All you really need is this part for what you need based on what I can tell from your explanation.

            on exitFrame me
            go the frame
            end exitFrame

            It causes a loop on the frame the script is in until something tells it to do otherwise.

            Your button can have a behavor script that says something like


            on mouseUp me
            go the frame + 1
            end

            That should start the director movie playing again
            • 3. Re: Script Help
              shariha Level 1
              Thank you; You are correct.
              • 4. Re: Script Help
                shariha Level 1
                Thank you; You are correct.