开发者

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:

  1. How do I play to a key frame, then start at a key frame and go to the next key frame?

  2. How do I go to a particular key frame? (i.e. I load a form and I want to show the current time)开发者_C百科

Firemonkey float key animation, goto a particular key

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜