Firemankey float key animation, goto specific key

In the Firemonkey 2d application, I use a float key to try and move the TLine control around the clock. I added 60 keyframes for the minute hand and 12 keyframes for the clockwise (in fact, this is a lot more keys, because I added one to the x position, y position, height and width).

So now I have two questions:

  • How to play a keyframe, and then start with a keyframe and move on to the next keyframe?

  • How to go to a specific keyframe? (i.e. load the form, and I want to show the current time)

Firemonkey clock

Note. I do this only to find out more about Delphi XE2, and not about solving a specific business solution.

+4
source share
1 answer

I have not tried, but.

Maybe you can use the TAnimations procedure

procedure ProcessTick(time, deltaTime: Single); 

And call him immediately after starting the animation from scratch with a deltatip that puts you on the right key.

Note that the function also includes a time parameter, but this code is apparently ignored in the code, otherwise you could use it to set the current time.

+1
source

All Articles