6 Replies Latest reply on Aug 7, 2006 11:13 PM by emstin

    stuck in an animaion

    emstin
      I have three animations in avi-format. I have made a play-button, which works out perfect for starting the animations the first time. But I would like to be able to use the play button while the animation is playing and more important when it is finished. Right now it is not possible. I can go where ever else when the animation is done, but when clicking my play-button nothing happens. So my question is; is there some way to say; when movie is finished go to frame?
      Thanks!
        • 1. Re: stuck in an animaion
          Level 7
          Your play button probably has code something like this right now:

          on mouseUp me
          sprite(X).movieRate = 1
          end


          You can change it to something like this to have it do more than one
          thing. The behavior will look at the movieTime of your avi sprite.

          -------
          property videoSprite
          property thisSprite

          on getPropertyDescriptionList
          myPropList = [:]
          myPropList.addProp(#videoSprite,[#comment:"enter the video sprite
          channel number here:",#format:#integer,#default:""])
          return myPropList
          end

          on beginSprite me
          thisSprite = me.spriteNum
          end

          on mouseUp me
          if sprite(videoSprite).movieTime = 0 then
          sprite(videoSprite).movieRate = 1
          else
          sprite(videoSprite).movieRate = 0
          go to "new marker"
          end if
          end

          ----------

          What will happen here is that if your digital video is at the first
          frame, it will play, if not, it will stop and the Director movie
          playback head will jump to where ever you tell it to go.

          --
          Rob
          _______
          Rob Dillon
          Adobe Community Expert
          http://www.ddg-designs.com
          412-243-9119

          http://www.macromedia.com/software/trial/
          • 2. Re: stuck in an animaion
            emstin Level 1
            Hi Rob and thanks a lot!
            This is exactly what i want. But im a beginner of Director and having trouble to get it to work. When I use your code Director says error. I have changed to make it to fit my movie, but i must do something wrong. Which things do I have to change?
            Thanks for helping, i appreciate it!
            /Emma
            • 3. Re: stuck in an animaion
              Level 7
              Hi Emma,

              You shouldn't have to change anything. The problem is most likely a
              wrapped line of code. Take a look at the getPropertyDescriptionList
              function and see if the addProp line lays out in one line. It should.

              --
              Rob
              _______
              Rob Dillon
              Adobe Community Expert
              http://www.ddg-designs.com
              412-243-9119

              http://www.macromedia.com/software/trial/
              • 4. Re: stuck in an animaion
                emstin Level 1
                Hi again Rob!

                the addProp line lays out in three lines, how can I change that?

                and also; sholudn´t I change in your code where you have written: :"enter the video sprite
                channel number here:" and "new marker"? when i change that i get an error message and it complains at row nbr 15 (if sprite (videoSprite).movieTime= o then )

                Thanks for taking time! /Emma


                • 5. Re: stuck in an animaion
                  Level 7
                  You shouldn't have to change any of the actual code. You do need to
                  remove the line feeds that are in that function.

                  --
                  Rob
                  _______
                  Rob Dillon
                  Adobe Community Expert
                  http://www.ddg-designs.com
                  412-243-9119

                  http://www.macromedia.com/software/trial/
                  • 6. Re: stuck in an animaion
                    emstin Level 1
                    Sorry for not getting it... but i still get the error-message when I press the button, even when I use your code without doing anything in it. Except changing the addProp line, got that one... but "remove the line feeds"?
                    Thanks again for helping!

                    /Emma