|
INTERVIEW QUESTIONS
WEB
ACTION SCRIPT
DETAILS
Question: Explain the difference between creating an effect and setting the target as opposed to adding an effectListener?
Answer: To 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>
|
|
|
Category |
Action Script Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 7811 users |
Added on |
9/22/2014 |
Views |
68729 |
Rate it! |
|
|
Question:
Explain the difference between creating an effect and setting the target as opposed to adding an effectListener?
Answer:
To 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> Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is the problem with calling setStyle()
|
View Answer
|
|
What does calling preventDefault() on an event do? How is this enforced?
|
View Answer
|
|
How do you add event listeners in mxml components. Now AS3 components?
|
View Answer
|
|
Why would you want to keep a reference to a ChangeWatcher and call unwatch()?
|
View Answer
|
|
What is the difference between ChangeWatcher.watch, and BindingUtils.bindProperty?
|
View Answer
|
|
Explain how binding works in mxml components in flex?
|
View Answer
|
|
What design patterns have you used? in Actionscript and java?
|
View Answer
|
|
What keyword allows us to implement abstraction better in flex?
|
View Answer
|
|
What is cairnghorm in flex? how do we use it?Have you worked with Cairnghorn in flex?
|
View Answer
|
|
What are runtime shared libraries in flex?
|
View Answer
|
|
What are sealed classes in flex?
|
View Answer
|
|
What is dynamic keyword used for in actionscript?
|
View Answer
|
|
How do we overload functions in actionscript?
|
View Answer
|
|
How polymorphism works on actionscript?
|
View Answer
|
|
What keyword allows you to refer to private variables of a class in flex?
|
View Answer
|
|
How does item renderer work? How do we add item renderer at runtime in flex?
|
View Answer
|
|
What is state? what is the difference between states and ViewStack in flex?
|
View Answer
|
|
What is MVC and how do you relate it to flex apps?
|
View Answer
|
|
What is the difference between sealed class and dynamic classes in flex?
|
View Answer
|
|
How do we use css styles in flex?
|
View Answer
|