Skip to main content
Participant
October 17, 2017
Answered

How do I trigger a change in an animation in animate? (From a loop to transition)

  • October 17, 2017
  • 3 replies
  • 571 views

I have recently been tasked by my employer with making an animation for our company awards night. A big task for a junior of two months given that this is normally outsourced.

I have a holding screen animation which I am making to play on a loop.

I am however wondering if there is a way that I can trigger the animation to tween from the loop into the next slide as a way to avoid boring fade transitions.

If anyone knows of any good tutorials or can point me in the right direction that would be amazing.

    This topic has been closed for replies.
    Correct answer JoãoCésar17023019

    You can, for example, have a timeline with 61 frames.

    Your loop animation plays from 2 to 31.

    Your transition animation plays from 31 to 61.

    On frame 1, you set a variable called 'frame' to 2, like so: var frame:int = 2.

    On the frame 31, you have a gotoAndPlay(frame) function. So your animation will be in loop.

    Then, in any moment, with a key press or mouse click, you set your variable 'frame' to 32, so when the playhead reaches the frame 31 your transition animation will be shown.

    Remember to put a stop() function on frame 61.

    If you have any questions or need an example of this built, please let me know.

    3 replies

    JoãoCésar17023019
    Community Expert
    JoãoCésar17023019Community ExpertCorrect answer
    Community Expert
    October 17, 2017

    You can, for example, have a timeline with 61 frames.

    Your loop animation plays from 2 to 31.

    Your transition animation plays from 31 to 61.

    On frame 1, you set a variable called 'frame' to 2, like so: var frame:int = 2.

    On the frame 31, you have a gotoAndPlay(frame) function. So your animation will be in loop.

    Then, in any moment, with a key press or mouse click, you set your variable 'frame' to 32, so when the playhead reaches the frame 31 your transition animation will be shown.

    Remember to put a stop() function on frame 61.

    If you have any questions or need an example of this built, please let me know.

    Inspiring
    October 17, 2017

    We need more information like how the holding screen is animated, how you want it to look when it is tweening to the slide, for example, do you want the screen to move off screen and show the other slide below?

    Ussnorway7605025
    Legend
    October 17, 2017

    moved to Animate CC forum