Explain the difference between creating an effect and setting the target as opposed to adding an effectListener?
Submitted by: AdministratorTo create a behavior, you define a specific effect with a unique ID and bind it to the trigger.
For example, the following code creates two zoom effects: one for shrinking the component slightly, and one for reverting it to its original size. These effects are assigned, by using their unique IDs, to the mouseDownEffect and mouseUpEffect triggers on the Button component.
<mx:Application ...>
<mx:Zoom id="shrink" duration="100" zoomHeightTo=".9" zoomWidthTo=".9" />
<mx:Zoom id="revert" duration="50" zoomHeightTo="1" zoomWidthTo="1" />
<mx:Panel title="Bouncy Button" paddingTop="10" paddingBottom="10"
paddingLeft="10" paddingRight="10" autoLayout="false" left="41" top="24" right="42">
<mx:Button id="bouncyButton" label="Click me!"
mouseDownEffect="{shrink}" mouseUpEffect="{revert}"/>
</mx:Panel>
</mx:Application>
Submitted by: Administrator
For example, the following code creates two zoom effects: one for shrinking the component slightly, and one for reverting it to its original size. These effects are assigned, by using their unique IDs, to the mouseDownEffect and mouseUpEffect triggers on the Button component.
<mx:Application ...>
<mx:Zoom id="shrink" duration="100" zoomHeightTo=".9" zoomWidthTo=".9" />
<mx:Zoom id="revert" duration="50" zoomHeightTo="1" zoomWidthTo="1" />
<mx:Panel title="Bouncy Button" paddingTop="10" paddingBottom="10"
paddingLeft="10" paddingRight="10" autoLayout="false" left="41" top="24" right="42">
<mx:Button id="bouncyButton" label="Click me!"
mouseDownEffect="{shrink}" mouseUpEffect="{revert}"/>
</mx:Panel>
</mx:Application>
Submitted by: Administrator
Read Online Adobe Flex Actionscript Job Interview Questions And Answers
Top Adobe Flex Actionscript Questions
☺ | What does calling preventDefault() on an event do? How is this enforced? |
☺ | How do you add event listeners in mxml components. Now AS3 components? |
☺ | What is the difference between ChangeWatcher.watch, and BindingUtils.bindProperty? |
☺ | Is it possible to make httpService Requests synchronous in adobe flex? |
☺ | Explain How many levels does Flash MX support? |
Top Adobe Categories
☺ | Adobe Photoshop Interview Questions. |
☺ | Adobe Illustrator Interview Questions. |
☺ | Adobe Flash Interview Questions. |
☺ | Adobe Flex Actionscript Interview Questions. |
☺ | Photoshop Expert Interview Questions. |