Firemonkey float key animation, goto a particular key
In a Firemonkey 2d application, I'm using a float key to attempt to move a TLine control around a clock. I've added 60 key frames for the minute hand and 12 key frames for the hour hand (actually it's a lot more keys because I added one on position x, position y, height and width).
So, now I have two questions:
How do I play to a key frame, then start at a key frame and go to the next key frame?
How do I go to a particular key frame? (i.e. I load a form and I want to show the current time)开发者_C百科
Note, I'm doing this just to learn more about Delphi XE2, not to solve any particular business solution.
I haven't tried it but.
You could use perhaps use TAnimations procedure
procedure ProcessTick(time, deltaTime: Single);
And call it right after you start your animation from scratch with a deltatime that will place you at the correct key.
Note that the function includes a time parameter too but that one seem to be ignored in code, otherwise you could probably use that to set the current time.
精彩评论