Flex Visual Effects-AnimateProperties Effect - Adobe Flex

What is the use of animatepoperties in flex?

Animate effect animates an arbitrary set of properties between values, specifies the properties and values for animating by setting the motionPaths property.

Class declaration

Below is the declaration for spark.effects.Animate class:

Public properties

S.N.

Property & Description

1

disableLayout : Boolean

If true, the effect disables layout on its targets' parent containers, setting the containers autoLayout property to false, and also disables any layout constraints on the target objects.

2

easer : IEaser

The easing behavior for this effect.

3

interpolator : IInterpolator

The interpolator used by this effect to calculate values between the start and end values of a property.

4

motionPaths : Vector.<MotionPath>

A Vector of MotionPath objects, each of which holds the name of a property being animated and the values that the property takes during the animation.

5

repeatBehavior : String

The behavior of a repeating effect, which means an effect with repeatCount equal to either 0 or > 1.

Public methods

S.N.

Method & Description

1

Animate(target:Object = null)

Constructor.

Events

S.N.

Event & Description

1

effectRepeat

Dispatched when the effect begins a new repetition, for any effect that is repeated more than once.

2

effectUpdate

Dispatched every time the effect updates the target.

Methods inherited

This class inherits methods from the following classes:

  • mx.effects.Effect
  • flash.events.EventDispatcher
  • Object

Flex Animate Effect Example

Follo below steps to check usage of Animate Effect in a Flex application by creating a test application:

Step

Description

1

Create a project with a name HelloWorld under a package com.wisdomjobs.client

2

Modify HelloWorld.mxml as explained below and skip rest of the files unchanged.

3

Compile and run the application to make sure business logic is working as per the requirements.

Below is the content of the modified mxml file src/com.wisdomjobs/HelloWorld.mxml.

After all the changes done, compile and run the application in normal mode as we did in Flex -Create Application chapter. If everything works fine with the application, this will produce below output

flex animate

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Adobe Flex Topics