3 Replies Latest reply on Feb 14, 2007 4:25 AM by newmfa

    FlashMovies

    newmfa Level 1
      Hi,
      in director, I have 2 swf movies, every movie contains 150 frames, I put next code
      in every movie end to let lingo play movie for its end:

      on exitframe me
      go to frame
      end

      how can make jump from flash movie to another when the first movie finished..?

      greeting
      newmfa
        • 1. Re: FlashMovies
          Level 7
          A simple way to control the playback head in Director when playing Flash
          is to test the current frame of the Flash movie. Something like this
          should do what you want:

          -----------
          property thisSprite
          property totalFrames

          on beginSprite me
          thisSprite = me.spriteNum
          totalFrames = sprite(thisSprite).member.frameCount
          end

          on exitframe me
          if sprite(thisSprite)._currentFrame < totalFrames then
          go to the frame
          else
          go to the frame + 1
          end if
          end
          -------------

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

          http://www.macromedia.com/software/trial/
          • 2. Re: FlashMovies
            duckets Level 1
            Place this code as a behaviour onto the flash sprite:

            [code]
            on exitframe me
            if sprite(me.spritenum).playing then
            go to the frame
            else
            go to the frame + 1 -- (or jump to another label if you like)
            end if
            end
            [/code]

            Make sure your flash movie does not have any actionscript which might prevent it from reaching the end of your movie. Even a stop(); on the last frame will cause problems. This is because if your flash movie has a stop(); on the last frame, Director will see that as the flash movie playing the last frame repeatedly, so Director will not ever consider it to have finished playing.

            - Ben
            • 3. Re: FlashMovies
              newmfa Level 1

              good codes,
              in your opinion, what is best code, first or second one?

              newmfa