FMX.AnimationDemoHD Sample

From RAD Studio Code Examples
Jump to: navigation, search

Language:

Versions:

This sample illustrates how to create HD animations with FireMonkey.

Contents

Location

You can find the AnimationDemoHD sample project at:

Description

This application uses several visual objects on a form and animates each of them with TColorAnimation, TFloatAnimation, TPathAnimation, and TBitmapAnimation.

How to Use the Sample

  1. Navigate to Start > Programs > Embarcadero RAD Studio XE3 > Samples and open AnimationDemoHD.dproj.
  2. Press F9 or choose Run > Run.


Classes

FireMonkey 2D Animation represents the main window of the sample. It contains the following components:

Implementation

  • The first FloatAnimation is subordinated to the ellipse, relating to the RotationAngle property. Its Loop property is set to True, in order to repeat the animation.
  • The ColorAnimation is related to the first rectangle's Color.
  • The second FloatAnimation is being handled by the second Rectangle, through its Opacity property.
  • The TImage object handles the BitmapAnimation, through its IsMouseOver trigger.
  • The third FloatAnimation relates to the third rectangle's Position.X property.
  • The RoundRect and the sixth Text are animated on a sinusoidal PathAnimation, defined in the Path.Data property.
  • The Path object is used for explicitly drawing the path for the PathAnimation.
  • TAniIndicator objects are used for indicating motion or progress.

Note: The entire project is implemented at design time, using the Tool Palette and the Object Inspector.

Uses

See Also

Personal tools