5 Replies Latest reply on Mar 1, 2008 12:22 PM by Newsgroup_User

    Creating Time Delay

      I am creating a multimedia CD ROM, and I have a simple flash animation that, once clicked, rotates on my director project to a new postion. The problem is, I want the user to be able to click this, have the animation play out (lasts less than half a second), then for the new frame to be loaded after the animation is complete.

      I am fairly new to Director, so the only way I have been able to try is to have some lingo on the animation which directs to the frame in question, unfortunately though this does not give time for the animation to play out.

      If that made any sense what-so-ever, I would much appreciate any help!

      Cheers

      Graeme
        • 1. Re: Creating Time Delay
          Level 7
          You can use some AS in the Flash file to tell Director when to navigate.
          If it's a frame based animation then you could place the AS on the last
          frame, if it's script-based then your AS must be able to detect when the
          animation is finished.
          // AS2:
          getURL("event:mNavigate()");

          -- code attached to the flash sprite in Director:
          -- (assumes there is a frameScript to hold the playhead
          -- over the span of the Flash sprite)
          property _flashDone

          on beginSprite me
          _flashDone = 0
          end

          on mNavigate me
          _flashDone = 1
          end

          on exitFrame me
          if _flashDone then go next
          end
          1 person found this helpful
          • 2. Re: Creating Time Delay
            Level 7
            You can also monitor the number of frames in the Flash animation from Lingo
            and test for when the current frame is equal to the last then instruct your
            projector what to do when that event happens.

            C

            "graemekyuss" <webforumsuser@macromedia.com> wrote in message
            news:fq7k0v$ajc$1@forums.macromedia.com...
            >I am creating a multimedia CD ROM, and I have a simple flash animation
            >that,
            > once clicked, rotates on my director project to a new postion. The problem
            > is,
            > I want the user to be able to click this, have the animation play out
            > (lasts
            > less than half a second), then for the new frame to be loaded after the
            > animation is complete.
            >
            > I am fairly new to Director, so the only way I have been able to try is to
            > have some lingo on the animation which directs to the frame in question,
            > unfortunately though this does not give time for the animation to play
            > out.
            >
            > If that made any sense what-so-ever, I would much appreciate any help!
            >
            > Cheers
            >
            > Graeme
            >


            • 3. Re: Creating Time Delay
              ah right I see, how would I go about that?

              Graeme
              • 4. Re: Creating Time Delay
                Level 7
                Add this behavior to your Flash sprite. Your movie will cycle on the first
                frame of the sprite. When the Flash sprite is clicked, the Flash animation
                will play. Make sure you click "paused" in the Flash member properties so
                it will wait until the mouse click to play. You can do this in Lingo but
                since you're new, I'm' keeping it simple.

                When the Flash animation reaches its last frame, it will jump to the marker
                "newFrame"

                Make sure you add the marker mentioned above to your score. If you want to
                call it something different in the score make sure you change its reference
                in the behavior too.

                property pClicked

                on beginSprite me
                pClicked = FALSE
                end

                on mouseUp me
                pClicked = TRUE
                sprite (me.spriteNum).play ()
                end

                on exitFrame me
                if pClicked = TRUE then
                if sprite (me.spriteNum).frame = sprite (me.spriteNum).member.frameCount
                then
                go to marker ("newFrame")
                end if
                end if
                go to the frame
                end





                "womp" <lingoforum@wordofmo.com> wrote in message
                news:fq945b$2k6$1@forums.macromedia.com...
                > You can also monitor the number of frames in the Flash animation from
                > Lingo and test for when the current frame is equal to the last then
                > instruct your projector what to do when that event happens.
                >
                > C
                >
                > "graemekyuss" <webforumsuser@macromedia.com> wrote in message
                > news:fq7k0v$ajc$1@forums.macromedia.com...
                >>I am creating a multimedia CD ROM, and I have a simple flash animation
                >>that,
                >> once clicked, rotates on my director project to a new postion. The
                >> problem is,
                >> I want the user to be able to click this, have the animation play out
                >> (lasts
                >> less than half a second), then for the new frame to be loaded after the
                >> animation is complete.
                >>
                >> I am fairly new to Director, so the only way I have been able to try is
                >> to
                >> have some lingo on the animation which directs to the frame in question,
                >> unfortunately though this does not give time for the animation to play
                >> out.
                >>
                >> If that made any sense what-so-ever, I would much appreciate any help!
                >>
                >> Cheers
                >>
                >> Graeme
                >>
                >
                >


                1 person found this helpful
                • 5. Re: Creating Time Delay
                  Level 7
                  > Add this behavior to your Flash sprite.

                  Be aware that this will only work if your Flash animation is all on
                  _root - if it uses movieClips for animation then this behavior may not
                  work as expected.
                  1 person found this helpful