locked
Timeline Animation (Farz) - 8/22/2006 4:00 PM PST RRS feed

  • Question

  • By: Farz

    Hi there,
    
    I’m trying to create a simple controlled box animation to be able to stop 
    the animation half way (expand) through the timeline on a certain key frame 
    and by hitting a button resume the animation (contract) and continue the 
    timeline.
    
    Is there a way to place a “stop” command on a certain key frame in timeline? 
    or any other methods that might do the same function.
    
    Thanks in advanced
    Farz,
    
    Tuesday, February 19, 2008 1:54 AM

Answers

  • By: Michael G. Emmons
    Interesting question...It can be done, although there isn't any way to hook
    that up using only the EID interface. Just add a click event to the button
    and in your codebehind add the code to programatically manipulate the
    timelines. I've not done much programmatical timeline manipulation, so I
    don't know how possible it is to query a timeline to get information about
    its current state. However, even if that isn't possible it would be pretty
    easy to implement your own State Machine design pattern. It would just be a
    matter of setting your current state manually whenever you start/stop/pause
    an animation. Then in your codebehind just determine the current state and
    make the button take the appropriate action.

    -Michael G. Emmons
    http://xamlxaml.com


    "Farz" <Farz@discussions.microsoft.com> wrote in message
    news:F107E9B0-C5F0-4441-9CFB-DFF678BEC395@microsoft.com...
    > Thank You for your help Michael, that was great info. I'm trying to reduce
    > the amount of timelines I may have, since I have lot of different short
    > animation sequences.
    >
    > Is there a way to give the same button different action commands at
    > different part of the timeline? So instead of using two different buttons
    > to
    > open/close, can I use one!
    >
    >
    > Thanks again for all you help, much appreciate it.
    >
    >
    > "Farz" wrote:
    >
    >> Hi there,
    >>
    >> I’m trying to create a simple controlled box animation to be able to stop
    >> the animation half way (expand) through the timeline on a certain key
    >> frame
    >> and by hitting a button resume the animation (contract) and continue the
    >> timeline.
    >>
    >> Is there a way to place a “stop” command on a certain key frame in
    >> timeline?
    >> or any other methods that might do the same function.
    >>
    >> Thanks in advanced
    >> Farz,
    >>

    Tuesday, February 19, 2008 6:28 PM

All replies

  • By: Michael G. Emmons
    Farz,

    There is no way to stop an animation on a certain keyframe. However, you can
    pause/unpause the animation anywhere you want by adding listen events to the
    timeline.

    Also, you can probably achieve what you want by breaking up your timeline
    into multiple timelines. For example, if you have 2 keyframes that you want
    your timeline to stop at just create 3 timelines--one going from the start
    to the first keyframe, the next going from the first keyframe to the second
    and the final going from the second keyframe to the end. To simulate a
    single animation simply call one timeline after another.

    Hope this helps!

    Michael G. Emmons
    http://xamlxaml.com


    "Farz" <Farz@discussions.microsoft.com> wrote in message
    news:F7678335-C2FC-4F91-97B1-1474AA0646F8@microsoft.com...

    Click to show or hide original message or reply text.


    Tuesday, February 19, 2008 6:27 PM
  • By: Farz
    Thank You for your help Michael, that was great info. I'm trying to reduce
    the amount of timelines I may have, since I have lot of different short
    animation sequences.

    Is there a way to give the same button different action commands at
    different part of the timeline? So instead of using two different buttons to
    open/close, can I use one!


    Thanks again for all you help, much appreciate it.


    "Farz" wrote:

    Click to show or hide original message or reply text.


    Tuesday, February 19, 2008 6:28 PM
  • By: Michael G. Emmons
    Interesting question...It can be done, although there isn't any way to hook
    that up using only the EID interface. Just add a click event to the button
    and in your codebehind add the code to programatically manipulate the
    timelines. I've not done much programmatical timeline manipulation, so I
    don't know how possible it is to query a timeline to get information about
    its current state. However, even if that isn't possible it would be pretty
    easy to implement your own State Machine design pattern. It would just be a
    matter of setting your current state manually whenever you start/stop/pause
    an animation. Then in your codebehind just determine the current state and
    make the button take the appropriate action.

    -Michael G. Emmons
    http://xamlxaml.com


    "Farz" <Farz@discussions.microsoft.com> wrote in message
    news:F107E9B0-C5F0-4441-9CFB-DFF678BEC395@microsoft.com...
    > Thank You for your help Michael, that was great info. I'm trying to reduce
    > the amount of timelines I may have, since I have lot of different short
    > animation sequences.
    >
    > Is there a way to give the same button different action commands at
    > different part of the timeline? So instead of using two different buttons
    > to
    > open/close, can I use one!
    >
    >
    > Thanks again for all you help, much appreciate it.
    >
    >
    > "Farz" wrote:
    >
    >> Hi there,
    >>
    >> I’m trying to create a simple controlled box animation to be able to stop
    >> the animation half way (expand) through the timeline on a certain key
    >> frame
    >> and by hitting a button resume the animation (contract) and continue the
    >> timeline.
    >>
    >> Is there a way to place a “stop” command on a certain key frame in
    >> timeline?
    >> or any other methods that might do the same function.
    >>
    >> Thanks in advanced
    >> Farz,
    >>

    Tuesday, February 19, 2008 6:28 PM