locked
How to set up a Time based Trigger RRS feed

  • Question

  • I need my handler function to be called at a particular time in the Animation Timeline.
    Say, at 10th second, a particular trigger needs to be raised.

    How do i set that??
    Is there a way to raise triggers at different stages of execution based on the time?
    [I am currently using Expr Blend 2.5 June Preview]

    Thanks in advance!

    Kaangeyan.

    Monday, October 13, 2008 4:39 PM

All replies

  • Howdy,

    Oh I sense a Flash user? This particular feature is not supported in Blend, and indeed creating it in code is very long winded. You would need to create a custom clock object and create a custom keyframing solution as well... all very nasty.

    The Blend solution is to create multiple storyboards, or to set of a timer and animation in code at the same time so as you can easily determine a tick when your required time segment is reached, although this probably wont be 100% accurate.

    Sorry I couldnt offer more here.

    Cheers

    Expression MVP

    Learn Expression Blend at learnexpressionstudio.com

    my blog : http://x-coders.com/blogs/sneaky/default.aspx

    Tuesday, October 14, 2008 11:00 PM
    Moderator
  • Hi Brennon,

    As much as your answer isn't the "desired" one - thank you for this. I'm new to WPF so I will assume that this still holds true(?). If so, you just saved me a ton of time - was thinking about WPF for a new project that has animation and a number of line of business routines.

    Yes, am also one coming from Flash....and have been looking for "frame actions" in WPF /Blend- essentially timline triggers (not really "time" per se). While animation is Flash staple, the line of business stuff would be a lot easier within .Net - (more comfortable with .net than AS). 

    Was trying to do something better than a winform + flash app (not "consolidated", just displayed in winform).....and was hoping WPF would be it. Started out very promising...but I'll probably have to hold off WPF until I get more expertise in it.

    Ed
    It's ____! http://dailycrapola.spaces.live.com/
    Tuesday, June 30, 2009 4:11 AM
  • Howdy Ed,

    It's still the way I am affraid. But I should also say that most of the time you can get around these issues by thinking about animations differently in WPF, becoming creative with Triggers/States etc.

    My only advice is to try to force yourself to use WPF rather than Winforms. If you run into any issues along the way, by all means pop back in here.

    Best of luck!

    Cheers

    Expression MVP

    my blog : http://x-coders.com/blogs/sneaky/default.aspx

    Tuesday, June 30, 2009 7:20 AM
    Moderator
  • Hi Brennon,

    Thanks! I'll probably be a fan of your blog site :)

    Yes, I am doing exactly that - WPF over Winform, and if this project didn't have that much animation needs (not really much in the Flash sense that is), it would likely be a WPF project.

    Since you asked :)

    1. A basic concept in Flash is "scenes". You can create independent scenes that can be navigated in a linear fashion or some other control. Some flash pros out there would probably say load/unload movies at will - but I'll keep it simple, it's really a "navigation concept" at its core anyway.

      After reading some MSDN lib docs, it seems NavigationWindow + Pages are the WPF counterparts
        
    2. You might find this laughable (did say I was new to WPF), but while it seems straightforward to navigate by capturing click events, how might one:

      - Move in a linear (no click event) fashion from "scene 1" to "scene 2", stop and then wait for click events for further navigation?

      - translated to WPF, how might a page 1 to page 2 transition be accomplished, without user interaction? Or any page for that matter?

    Sorry if this is such a  basic question, but I think it would be of interest to myself and others, particularly if you're used to Flash.....it's almost a "core" animation concept so if its actually a no-brainer in WPF, that would be great. The concepts in this basic task sound valuable in any animation work.


    Thanks again!

    Ed


    It's ____! http://dailycrapola.spaces.live.com/
    Tuesday, June 30, 2009 3:33 PM
  • I have used in one of my article

    http://www.codeproject.com/kb/wpf/witiymiwyg.aspx

    please go through it, I hope this will help you :)


    Prasad - www.beautifulmind.blog.co.in
    Microsoft MVP
    • Proposed as answer by prasad22 Tuesday, June 30, 2009 3:46 PM
    Tuesday, June 30, 2009 3:46 PM
  • Hi Prasad,

    That was great - thank you!

    Just added another way to get "scenes" to work!

    Ed

    It's ____! http://dailycrapola.spaces.live.com/
    Wednesday, July 1, 2009 10:06 PM