View Single Post
  #4 (permalink)  
Old 09-22-2007, 03:37 AM
Karpagarajan Karpagarajan is offline
D-Web Analyst
 
Join Date: Mar 2007
Posts: 297
Karpagarajan is on a distinguished road
Thumbs up Re: Adobe Flex Tips & Tricks

behavior

A behavior is a combination of a trigger paired with an effect. A trigger is an action, much like an event, such as a mouse click on a component, a component getting focus, or a component becoming visible. An effect is a visible or audible change to the component occurring over a period of time, measured in milliseconds. Examples of effects are fading, resizing, or moving a component. You can define multiple effects for a single trigger.

Behaviors let you add animation, motion, and sound to your application in response to some user or programmatic action. For example, you can use behaviors to cause a dialog box to bounce slightly when it receives focus, or to play a sound when the user enters an invalid value. Flex uses a Cascading Style Sheet (CSS) to define behavior properties. You can reference the style properties as tag properties in MXML, within the <mx:Style> tag, or in an ActionScript function. For example, to configure the effect for the show trigger within an <mx:Image> tag, you use the following MXML syntax:
<mx:Image showEffect="Fade" source="first.jpeg" />
In this example, the Image control fades in over 500 milliseconds, the default time interval for a Fade effect.

thanks
__________________
Karpagarajan. R
Necessity is the mother of invention
Reply With Quote