An effect is a change to a component that occurs over a brief period of time. Examples of effects are fading, resizing, and moving a component. An effect is combined with a trigger, such as a mouse click on a component, a component getting focus, or a component becoming visible, to form a behavior. In MXML, you apply effects as properties of a control or container. Flex provides a set of built-in effects with default properties.
The following example shows an application that contains a Button control with its mouseOverEffect property set to the standard Zoom effect. The Zoom effect executes when the user moves the mouse pointer over the Button control.
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:Panel title="My Application" marginTop="10" marginBottom="10"
marginLeft="10" marginRight="10" >
<mx:Button id="myButton" mouseOverEffect="Zoom" />
</mx:Panel>
</mx:Application>
You can use the <mx:Effect> tag to customize a standard effect or combine effects into a composite effect. For more information about effects, see Using Behaviors in Developing Flex Applications.
Version 1.5
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flex/15/flex_docs_en/00000024.htm