SlideShare une entreprise Scribd logo
1  sur  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!

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Dernier

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Dernier (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

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.