SlideShare una empresa de Scribd logo
1 de 20
Introduction to Flex

          Parambir Singh
What is Flex?
Free open source framework built for Flash Player consisting of
 MXML
           XML Based declarative language to define UI
           Similar to HTML/XHTML
   ActionScript 3
   Flex Class Library
       Containers
       Controls
       Charting Components
How Flex Works
Flex Compilation
   Flex supports two compilers
       mxmlc: To compile Flex applications
       compc: To compile Flex components
   The compiler first compiles MXML files to ActionScript (AS) classes.
       Each MXML tag corresponds to an AS class.
   Then the generated AS files along with other (user defined) AS files
    are compiled to Flash byte code (SWF file).
   The SWF file runs in Flash Player.
MXML v/s ActionScript
   MXML:
       <mx:Button id=“myButton” label=“I’m a button” />
   ActionScript:
       var myButton:Button;
        myButton = new Button();
        myButton.label = “I’m a button”;
        addChild(myButton);
   Output:
MXML
   MXML is XML based declarative language
   Can contain only one root node
   Root node can be one of the following
       Application
           <mx:Application>
           Used to define Flex applications
       Component
           Any component tag (except ‘Application’) e.g. <mx:Canvas>, <mx:Panel>
           Used to create custom components
           Similar to extending a class in Java or AS
   Supports inline event handlers
       <mx:Button id=“myButton” click=“Alert(‘Hi’)” />
Data Binding
   Used to link one component property to some other component’s
    property
   When one property changes, the other property is updated
    automatically
   Example:
       <mx:TextInput id=“input” />
        <mx:Text id=“output” text=“{input.text}” />
Containers
   UI Elements to hold other containers or controls
   Two categories of containers
       Layout containers
           Used to lay out children according to some rules (horizontally/vertically/grid/tile
            etc)
           Control sizing/positioning of their children
       Navigation containers
           Control user movement/navigation among multiple child containers
Layout Containers
   Flex has many layout containers including
       Canvas
       Grid
       HBox/VBox
       HDividedBox/VDividedBox
   Canvas container uses absolute layout
       Explicitly set x,y position and size of children
       Supports constraints based layout
   Other containers support automatic layout based on their type
       HBox/HDividedBox lays out children horizontally
       Grid lays out children in a grid
   Support scroll bars
Flex Controls
   Controls are User Interface components – button, list, checkbox,
    radio button etc
   Flex library contains more than 30 controls
   Many other open source/commercial controls are available
   Most controls have
       MXML API for declaring control, its properties and events
       AS API for calling methods and setting properties at runtime
       Customizable appearance (styles/skinning)
Flex Controls
   Buttons
       Button, ButtonBar, LinkBar etc.
   List
       List, HorizontalList, TileList etc.
   Tree and Grid
       Tree, DataGrid etc.
   Data Entry
       Label, Text, TextInput, TextArea, RichTextEditor etc.
   Other
       Alert, SWFLoader, ColorPicker, etc.
Flex Controls
   Data provider controls
       Collection of objects (similar to array, more like ArrayList in Java)
       Provide layer of abstraction so multiple controls can use one data provider
        (model/view)
       Examples
           <mx:XML>
           <mx:ArrayCollection>
           <mx:XMLListCollection>
   Both containers and controls can be extended to make custom
    containers/controls.
CSS Styling
   Appearance of controls can be modified through style properties
   Can also be styled using CSS
       Both inline and external stylesheets supported
   Similar concept to HTML CSS. However Flex CSS doesn’t support all
    HTML CSS options.
   Styling can be done at runtime using StyleManager class
       StyleManager.getStyleDeclaration(“Button”).setStyle(“fontsize”, 24);
Skinning
   Refers to changing the way a component looks by replacing the
    assets that make up visual appearance.
   Two ways to skin a component
       Graphical Skinning – Use bitmap/vector graphics to change component
        appearance
       Programmatic Skinning – Graphics are drawn using AS to change
        appearance of the component.
States
   A flex application can have different views (called states)
   Application can transition from one state to another
   During a change of state
       Children can be added/removed
       Children can be repositioned
       Properties of children can be changed
States
   There is always a “default state” or “base state” of the application
   State changes are easy to define
       <mx:State name=“Register”>
        <mx:AddChild relativeTo=“{vBox}”>
            <mx:CheckBox id=“checkbox” label=“Sure?” />
        </mx:AddChild>
        </mx:State>
Effects
   Flex framework includes many standard effects
       Blur, Move, Fade, Dissolve, Glow etc.
   Defining an effect in MXML is pretty easy
           <mx:Move id=“moveEffect” target=“{textInput1}” xFrom=“-
            100” />
   Effects can be played using two ways:
       Manually through AS:
           moveEffect.play();
       Using triggers
           <mx:TextInput id=“textInput1”
            creationCompleteEffect=“{moveEffect}” />
   Flex components support many triggers
           E.g. creationCompleteEffect, focusInEffect, focusOutEffect,
            mouseDownEffect, mouseUpEffect etc.
Transitions
   Transitions allow you to apply effects to state view changes.
          <mx:Transition fromState=“*” toState=“B”>
           <mx:Rotate target=“{vBox}” angleFrom=“0” angleTo=“360” />
           </mx:Transition>
   During a transition, effects can be applied in parallel or sequence to
    multiple targets
          <mx:Transition fromState=“*” toState=“*”>
           <mx:Parallel targets=“{[windowA, windowB, windowC]}”>
               <mx:Move/>
               <mx:Resize/>
           </mx:Parallel>
           </mx:Transition>
Charting Components
   Not part of Flex SDK – Available with Flex Builder Professional
   9 types of charts available
       Area, Bar, Column, Line, Pie etc.
   Can be extended to provide interactivity
   Can be styled/skinned to customize appearance
   Can have a variety of effects/transitions applied.
Thank You!

Más contenido relacionado

Similar a Introduction to the Flex Framework

Adobe Flex Introduction
Adobe Flex IntroductionAdobe Flex Introduction
Adobe Flex IntroductionAmal Biswas
 
Exploring Adobe Flex
Exploring Adobe Flex Exploring Adobe Flex
Exploring Adobe Flex senthil0809
 
Flex 3 - Introduction
Flex 3 - IntroductionFlex 3 - Introduction
Flex 3 - Introductionrakhtar
 
Flex3中文教程
Flex3中文教程Flex3中文教程
Flex3中文教程yiditushe
 
Adobe Flex - Developing Rich Internet Application Workshop Day 2
Adobe Flex - Developing Rich Internet Application Workshop Day 2Adobe Flex - Developing Rich Internet Application Workshop Day 2
Adobe Flex - Developing Rich Internet Application Workshop Day 2Shyamala Prayaga
 
Flex MXML Programming
Flex MXML ProgrammingFlex MXML Programming
Flex MXML ProgrammingAngelin R
 
Introductontoxaml
IntroductontoxamlIntroductontoxaml
Introductontoxamlsunhope777
 
Flex In Portal Final
Flex In Portal   FinalFlex In Portal   Final
Flex In Portal FinalSunil Patil
 
Mobile application
Mobile applicationMobile application
Mobile applicationaspnet123
 
Silverlight Developer Introduction
Silverlight   Developer IntroductionSilverlight   Developer Introduction
Silverlight Developer IntroductionTomy Ismail
 
Silverlight 2
Silverlight 2Silverlight 2
Silverlight 2Dave Bost
 
Adobe Flex Don't Style It, Skin it!
Adobe Flex Don't Style It, Skin it!Adobe Flex Don't Style It, Skin it!
Adobe Flex Don't Style It, Skin it!DevelopmentArc LLC
 
WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2Shahzad
 

Similar a Introduction to the Flex Framework (20)

Adobe Flex Introduction
Adobe Flex IntroductionAdobe Flex Introduction
Adobe Flex Introduction
 
Exploring Adobe Flex
Exploring Adobe Flex Exploring Adobe Flex
Exploring Adobe Flex
 
Flex 3 - Introduction
Flex 3 - IntroductionFlex 3 - Introduction
Flex 3 - Introduction
 
Flex3中文教程
Flex3中文教程Flex3中文教程
Flex3中文教程
 
XAML and WPF - Dinko Jakovljević
XAML and WPF - Dinko JakovljevićXAML and WPF - Dinko Jakovljević
XAML and WPF - Dinko Jakovljević
 
Adobe Flex - Developing Rich Internet Application Workshop Day 2
Adobe Flex - Developing Rich Internet Application Workshop Day 2Adobe Flex - Developing Rich Internet Application Workshop Day 2
Adobe Flex - Developing Rich Internet Application Workshop Day 2
 
Flex MXML Programming
Flex MXML ProgrammingFlex MXML Programming
Flex MXML Programming
 
Adobe Flex4
Adobe Flex4 Adobe Flex4
Adobe Flex4
 
Introduction To Flex
Introduction To FlexIntroduction To Flex
Introduction To Flex
 
Introductontoxaml
IntroductontoxamlIntroductontoxaml
Introductontoxaml
 
Chpater1
Chpater1Chpater1
Chpater1
 
Test
TestTest
Test
 
Flex In Portal Final
Flex In Portal   FinalFlex In Portal   Final
Flex In Portal Final
 
Mobile application
Mobile applicationMobile application
Mobile application
 
Silverlight Developer Introduction
Silverlight   Developer IntroductionSilverlight   Developer Introduction
Silverlight Developer Introduction
 
Silverlight 2
Silverlight 2Silverlight 2
Silverlight 2
 
Adobe Flex Don't Style It, Skin it!
Adobe Flex Don't Style It, Skin it!Adobe Flex Don't Style It, Skin it!
Adobe Flex Don't Style It, Skin it!
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
WPF Line of Business Control Templates Styles
WPF Line of Business Control Templates StylesWPF Line of Business Control Templates Styles
WPF Line of Business Control Templates Styles
 
WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2
 

Último

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Último (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Introduction to the Flex Framework

  • 1. Introduction to Flex Parambir Singh
  • 2. What is Flex? Free open source framework built for Flash Player consisting of  MXML  XML Based declarative language to define UI  Similar to HTML/XHTML  ActionScript 3  Flex Class Library  Containers  Controls  Charting Components
  • 4. Flex Compilation  Flex supports two compilers  mxmlc: To compile Flex applications  compc: To compile Flex components  The compiler first compiles MXML files to ActionScript (AS) classes.  Each MXML tag corresponds to an AS class.  Then the generated AS files along with other (user defined) AS files are compiled to Flash byte code (SWF file).  The SWF file runs in Flash Player.
  • 5. MXML v/s ActionScript  MXML:  <mx:Button id=“myButton” label=“I’m a button” />  ActionScript:  var myButton:Button; myButton = new Button(); myButton.label = “I’m a button”; addChild(myButton);  Output:
  • 6. MXML  MXML is XML based declarative language  Can contain only one root node  Root node can be one of the following  Application  <mx:Application>  Used to define Flex applications  Component  Any component tag (except ‘Application’) e.g. <mx:Canvas>, <mx:Panel>  Used to create custom components  Similar to extending a class in Java or AS  Supports inline event handlers  <mx:Button id=“myButton” click=“Alert(‘Hi’)” />
  • 7. Data Binding  Used to link one component property to some other component’s property  When one property changes, the other property is updated automatically  Example:  <mx:TextInput id=“input” /> <mx:Text id=“output” text=“{input.text}” />
  • 8. Containers  UI Elements to hold other containers or controls  Two categories of containers  Layout containers  Used to lay out children according to some rules (horizontally/vertically/grid/tile etc)  Control sizing/positioning of their children  Navigation containers  Control user movement/navigation among multiple child containers
  • 9. Layout Containers  Flex has many layout containers including  Canvas  Grid  HBox/VBox  HDividedBox/VDividedBox  Canvas container uses absolute layout  Explicitly set x,y position and size of children  Supports constraints based layout  Other containers support automatic layout based on their type  HBox/HDividedBox lays out children horizontally  Grid lays out children in a grid  Support scroll bars
  • 10. Flex Controls  Controls are User Interface components – button, list, checkbox, radio button etc  Flex library contains more than 30 controls  Many other open source/commercial controls are available  Most controls have  MXML API for declaring control, its properties and events  AS API for calling methods and setting properties at runtime  Customizable appearance (styles/skinning)
  • 11. Flex Controls  Buttons  Button, ButtonBar, LinkBar etc.  List  List, HorizontalList, TileList etc.  Tree and Grid  Tree, DataGrid etc.  Data Entry  Label, Text, TextInput, TextArea, RichTextEditor etc.  Other  Alert, SWFLoader, ColorPicker, etc.
  • 12. Flex Controls  Data provider controls  Collection of objects (similar to array, more like ArrayList in Java)  Provide layer of abstraction so multiple controls can use one data provider (model/view)  Examples  <mx:XML>  <mx:ArrayCollection>  <mx:XMLListCollection>  Both containers and controls can be extended to make custom containers/controls.
  • 13. CSS Styling  Appearance of controls can be modified through style properties  Can also be styled using CSS  Both inline and external stylesheets supported  Similar concept to HTML CSS. However Flex CSS doesn’t support all HTML CSS options.  Styling can be done at runtime using StyleManager class  StyleManager.getStyleDeclaration(“Button”).setStyle(“fontsize”, 24);
  • 14. Skinning  Refers to changing the way a component looks by replacing the assets that make up visual appearance.  Two ways to skin a component  Graphical Skinning – Use bitmap/vector graphics to change component appearance  Programmatic Skinning – Graphics are drawn using AS to change appearance of the component.
  • 15. States  A flex application can have different views (called states)  Application can transition from one state to another  During a change of state  Children can be added/removed  Children can be repositioned  Properties of children can be changed
  • 16. States  There is always a “default state” or “base state” of the application  State changes are easy to define  <mx:State name=“Register”> <mx:AddChild relativeTo=“{vBox}”> <mx:CheckBox id=“checkbox” label=“Sure?” /> </mx:AddChild> </mx:State>
  • 17. Effects  Flex framework includes many standard effects  Blur, Move, Fade, Dissolve, Glow etc.  Defining an effect in MXML is pretty easy  <mx:Move id=“moveEffect” target=“{textInput1}” xFrom=“- 100” />  Effects can be played using two ways:  Manually through AS:  moveEffect.play();  Using triggers  <mx:TextInput id=“textInput1” creationCompleteEffect=“{moveEffect}” />  Flex components support many triggers  E.g. creationCompleteEffect, focusInEffect, focusOutEffect, mouseDownEffect, mouseUpEffect etc.
  • 18. Transitions  Transitions allow you to apply effects to state view changes.  <mx:Transition fromState=“*” toState=“B”> <mx:Rotate target=“{vBox}” angleFrom=“0” angleTo=“360” /> </mx:Transition>  During a transition, effects can be applied in parallel or sequence to multiple targets  <mx:Transition fromState=“*” toState=“*”> <mx:Parallel targets=“{[windowA, windowB, windowC]}”> <mx:Move/> <mx:Resize/> </mx:Parallel> </mx:Transition>
  • 19. Charting Components  Not part of Flex SDK – Available with Flex Builder Professional  9 types of charts available  Area, Bar, Column, Line, Pie etc.  Can be extended to provide interactivity  Can be styled/skinned to customize appearance  Can have a variety of effects/transitions applied.