DISCLAIMER: This video is boring to the average YouTube viewer.
How can you record and play back movements?
We create a rolling surface. On this Mobile reacts with Pan. Then we put a layout on it. Player or ball, are just circles. We place a circle on the layout. The circuit is responsive to Pan, so that a shift of the rolling surface is prevented when we move the circle. Only one channel can have the focus. Therefore, the buttons without focus. Because we use the buttons, and the focus indicates the current object. The path is recorded. We utilize the property of TPathAnimation. We remember, this is the position of the circle always at the top left. Therefore, the path needs to be adjusted. The route is removed when we delete the data. However, only the circuit which has the focus. It captures only the circle that is in the record mode. The may be one or all of them. The circle is moved, the path is recorded. The color black, no record mode. Then the circle can be moved without recording. With Play all circuits are sought. These circles are asked, do you have a way? Then simply stoped then started. Of course, the animation must be of equal length. It is in the further how to set this time or matches.
The layout draws the way, that's all. We show how to do it.
Keys: FMX.InertialMovement, Math, TToolBar, TButton, TScrollBox, TLayout, TCircle, TPathAnimation, TBevelEffect, TStyleBook, PathAnimation1Process, Circle1Gesture, Layout1Painting, Self.Focused, Stroke.Color, TAlphaColors, ShowMessage, TComponent, Children.Count, Path.IsEmpty, PointF, Repaint, TGestureEventInfo, Handled, LocalToAbsolute, ShowHint, Position.DefaultValue, Path.LastPoint.Distance, Path.MoveTo, Path.LineTo, InflateRect, Canvas.DrawEllipse, TAniCalculations.Create(Nil), AniCalculations.Assign, Animation, AutoShowing, Averaging, SetBounds, OnMouseMove, OnMouseUp, OnGesture, AutoCapture, CanFocus, OnPaint, Fill.Color, TStrokeBrush, TPathData, TStrokeBrush.Create, TPathAnimation(Sender).Parent