SlideShare uma empresa Scribd logo
1 de 61
Skinning in Flex 4 Saurabh Narula http://blog.saurabhnarula.com/ http://twitter.com/saurabhnarula
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is skinning ?
Styling in Flex 3
Styling or Skinning?
Example of skinning in flex 3 A Button Control Up  over  down  State Skin Property Down DownSkin over overSkin up upSkin disabled disabledSkin selectedDisabled selectedDisabledSkin selectedDown selectedDownSkin selectedOver selectedOverSkin selectedUp selectedUpSkin
1. Create a Skin (types of skins) graphical skins programmatic skins Stateful skins 2. Assign a skin to a component by style properties (CSS). 3. Set a style property by MXML tag properties,  the StyleManager class (runtime),  <mx:Style> blocks, or CSS
Demo Skinning in Flex 3
why a new paradigm of Skinning in Flex 4?
Designer – Developer interaction? Full fledged, customized look & feel hard to achieve Expectation of knowledge about how components are structured, should know actionscript As a result ..
Skinning becomes time consuming Design requirements change ->  more effort to include updates spend more time in the code to meet the design change As a result ..
Flex 4!!
Components in Flex 3 In Halo, Components were rigid. Hard to Extend. Monkey Patching.
Components in Flex 4 Separation of data, logic, behavior  from   visuals, states, animation and layout  Write component logic with no assumption about the appearance and vice versa.  M Architecture inside your component C V
MVC in a button M label:String, selected:Boolean text field, icon, background mouse handlers, selection logic C V
Halo Component V Skin (Background) Extend the view M C V
Spark Component V Skin (Entire View) M C
Example: Button with Two icons Extend viewIconForPhase Halo Spark Extend layoutContents ActionScript knowledge Copy MXML from default Button Skin Two Image tags Adjust position/size of icons and label Done! - All MXML!
Skin Component Relationship Component V Skin (Entire View) Skinning Contract M C
Flex 4 Skinning Highlights ,[object Object],[object Object],[object Object],[object Object]
Usage Scenarios -  User (developer)  A User (developer)  wants to change the look and feel of a button Create a button skin in MXML MXML can be generated / modified with the help of a tool No actionscript
Usage Scenarios -  Developer (creator)  A Developer  create a custom component that he wants to sell to other customers Extend  SkinnableComponent , spark component lifecycle Skinning this component is now easy
Usage Scenarios - Designer A Designer  wants to earn some extra money Package Skins into SWC and sell Change CSS and make use of these skins
Each component contains four conceptual pieces:  model, skin, controller, and view-specific logic
Block layout for skinnable component  Skins are associated through CSS
Skinning Contract association  between a  component  and its  skin A valid contract contains Skin parts Skin states Host Component
Skinning Contract .. The Component Class must .. Assign a  skin class Identify the  Skin Parts Identify the  Skin States The Skin Class must .. Define the  Host Component Declare  Skin States , and define their appearance Define the appearance of the  Skin Parts
Demo Skinning contract in a button
Skinning Contract ..
 
SkinPart Lifecycle
FXG and MXML Graphics the new interchange format for the Flash Platform ,[object Object],[object Object],[object Object],[object Object]
FXG .. use a graphics tool such as PhotoShop or Illustrator to export an FXG document use the FXG document as a component in your Flex application FXG components are highly optimized cannot reference instances of objects within the FXG document from the application or other components Can not add Actionscript or mxml code Example - <Rect>
MXML Graphics write MXML graphics code in Flash Builder add interactivity to MXML graphics - they use classes in the Flex SDK that are subclasses of GraphicElement result is not as optimized as FXG MXML graphics, the tags are mapped to their ActionScript equivalent classes More Control over graphic elements Example - <s:Rect>
FXG and MXML graphics define the following: Graphics and text primitives Fills, strokes, gradients, and bitmaps Support for filters, masks, alphas, and blend modes
FXG FXG FXG FXG FXG Designer - Developer Workflow FXG FXG
FXG ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
FXG Simple Shape primitives  (Rectangles, rounded rects,  ellipses, circles) Complex Paths (Linear, Quadratic, and Bezier curve segments) Full range of fills and strokes  (solid, transparent, bitmap, linear and radial gradients) Masking, filters, blend modes, and more. (blur, glow, dropshadow, screen, multiply…) Color and 2D transformations (rotate, scale, tint, brighten…) Integrated text,  bitmaps
Demo Writing a Custom Skinnable component QoutesBoard Component Qoutes Board/Group – A Static Part Qoute – dynamic Part Label Display – dynamic Part Close Button – dynamic part
Credits and References http://opensource.adobe.com/wiki/display/flexsdk/Gumbo#Gumbo-DocumentsandSpecifications http://www.slideshare.net/rjowen/flex-4-overview http://weblog.mrinalwadhwa.com/
Questions ? Thank you. Saurabh Narula http://blog.saurabhnarula.com/ http://twitter.com/saurabhnarula
Reference Slides ,[object Object],[object Object],[object Object],[object Object],[object Object]
States ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
States .. (comparison) Flex 3 - addchild equivalent <mx:Application  xmlns:mx=&quot; http://www.adobe.com/2006/mxml &quot; layout=&quot; absolute &quot; > <mx:states> <mx:State  name=&quot; newCheckbox &quot; > <mx:AddChild  relativeTo=&quot; { vbox } &quot; > <mx:CheckBox  id=&quot; checkbox &quot; label=&quot; Checkbox &quot;  /> </mx:AddChild> </mx:State> <mx:State  name=&quot; newTextArea &quot; basedOn=&quot; newCheckBox &quot; > <mx:AddChild  relativeTo=&quot; { vbox } &quot; > <mx:TextArea  id=&quot; textarea &quot;  /> </mx:AddChild> </mx:State> </mx:states> <mx:VBox  id=&quot; vbox &quot; > <mx:Button  label=&quot; Click &quot; click=&quot;currentState= 'newCheckbox' &quot;  /> <mx:Button  label=&quot; Click &quot; click=&quot;currentState= 'newTextArea' &quot;  /> </mx:VBox> </mx:Application>
States .. (comparison) Flex 4 - addchild equivalent <mx:Application  xmlns:mx=&quot; library:ns.adobe.com/flex/halo &quot; xmlns:m=&quot; http://ns.adobe.com/mxml/2009 &quot; layout=&quot; absolute &quot; > <m:states> <m:State  name=&quot; default &quot; /> <m:State  name=&quot; newCheckbox &quot; /> <m:State  name=&quot; newTextArea &quot; /> </m:states> <mx:VBox> <mx:Button  label=&quot; Click &quot; click=&quot; currentState='newCheckbox' &quot;  /> <mx:Button  label=&quot; Click &quot; click=&quot; currentState='newTextArea' &quot;  /> <mx:CheckBox  id=&quot; checkbox &quot; label=&quot; Checkbox &quot; includeIn=&quot; newCheckbox, newTextArea &quot; /> <mx:TextArea  id=&quot; textarea &quot; includeIn=&quot; newTextArea &quot; /> </mx:VBox> </mx:Application>
States .. (comparison) Flex 3 - child insertion <mx:Application  xmlns:mx=&quot; http://www.adobe.com/2006/mxml &quot; layout=&quot; absolute &quot; > <mx:states> <mx:State  name=&quot; newTextInput &quot; > <mx:AddChild  relativeTo=&quot; { checkbox1 } &quot; position=&quot; after &quot; > <mx:TextInput  id=&quot; textinput &quot;  /> </mx:AddChild> </mx:State> </mx:states> <mx:VBox  id=&quot; vbox &quot; > <mx:CheckBox  id=&quot; checkbox1 &quot; label=&quot; One &quot;  /> <mx:CheckBox  id=&quot; checkbox2 &quot; label=&quot; Two &quot;  /> <mx:Button  id=&quot; button &quot; label=&quot; Click &quot; click=&quot;currentState= 'newTextInput' &quot;  /> </mx:VBox> </mx:Application>
States .. (comparison) Flex 4 - child insertion <mx:Application  xmlns:mx=&quot; library:ns.adobe.com/flex/halo &quot;  xmlns:m=&quot; http://ns.adobe.com/mxml/2009 &quot; layout=&quot; absolute &quot; > <m:states> <m:State  name=&quot; default &quot; /> <m:State  name=&quot; newTextInput &quot; /> </m:states> <mx:VBox> <mx:CheckBox  label=&quot; One &quot;  /> <mx:TextInput  includeIn=&quot; newTextInput &quot; /> <mx:CheckBox  label=&quot; Two &quot;  /> <mx:Button  id=&quot; button &quot; label=&quot; Click &quot; click=&quot; currentState='newTextInput' &quot;  /> </mx:VBox> </mx:Application>
States .. (comparison) Flex 3 - A RemoveChild Equivalent <mx:Application  xmlns:mx=&quot; http://www.adobe.com/2006/mxml &quot; layout=&quot; absolute &quot; > <mx:states> <mx:State  name=&quot; noCheckboxes &quot; > <mx:RemoveChild  target=&quot; { checkbox1 } &quot;  /> <mx:RemoveChild  target=&quot; { checkbox2 } &quot;  /> </mx:State> </mx:states> <mx:VBox  id=&quot; vbox &quot; > <mx:CheckBox  id=&quot; checkbox1 &quot; label=&quot; One &quot;  /> <mx:CheckBox  id=&quot; checkbox2 &quot; label=&quot; Two &quot;  /> <mx:Button  id=&quot; button &quot; label=&quot; Click &quot; click=&quot;currentState= 'noCheckboxes' &quot;  /> </mx:VBox> </mx:Application>
States .. (comparison) Flex 4 - A RemoveChild Equivalent <mx:Application  xmlns:mx=&quot; library:ns.adobe.com/flex/halo &quot;  xmlns:m=&quot; http://ns.adobe.com/mxml/2009 &quot; layout=&quot; absolute &quot; > <m:states> <m:State  name=&quot; default &quot; /> <m:State  name=&quot; noCheckboxes &quot; /> </m:states> <mx:VBox  id=&quot; vbox &quot; > <mx:CheckBox  label=&quot; One &quot; excludeFrom=&quot; noCheckboxes &quot; /> <mx:CheckBox  label=&quot; Two &quot; includeIn=&quot; default &quot; />   <!-- Works as above --> <mx:Button  id=&quot; button &quot; label=&quot; Click &quot; click=&quot; currentState='noCheckboxes' &quot;  /> </mx:VBox> </mx:Application>
Data
Skin Parts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Defining Skin Parts on the Skin ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Working with Static Parts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Working with Dynamic Parts ,[object Object],[object Object],[object Object],[object Object]
Working with Deferred Parts ,[object Object],[object Object],[object Object],public   class  MyComponent  extends  SkinnableComponent { // Declare the &quot;details&quot; part [ SkinPart ] public   var  details:DetailsPane; override   protected   function  partAdded(partName:String, instance:*): void { super .partAdded(partName, instance); if  (partName ==  &quot;details&quot; ) { // Details part has been created. Attach behaviors here. details.addEventListener(...); details.doSomethingElse(); } } }
CSS Changes and Advanced Selectors
CSS Changes and Advanced Selectors ..  Demo
Containers and Layouts Group Lowest level container in Spark framework Supports both UIComponents and GraphicElements Only the bare essentials: Layout (through delegates) Containment Basic Flash player features (transforms, etc.) DataGroup The basis of any “List” based container Anything that uses ItemRenderers In Spark, everything displayable resides in a Group
Containers and Layouts ..
Containers and Layouts .. layouts have been separated from the containers When a Spark container measure() or updateDisplayList() method is called, the task of measurement and child arrangement is promptly delegated to a Spark layout instance Assignable and custom Layouts All layout classes extend LayoutBase VerticalLayout, HorizontalLayout, TileLayout, BasicLayout (Canvas) Basis of layout for all containers, lists, skins, etc. The goal: clean layout, easy extension, consistent behavior Big difference: layouts can support transforms Even though containers support clipping and scrolling, they don't put up scrollbars automatically like Halo does
Containers and Layouts .. Custom Layout Demo

Mais conteúdo relacionado

Mais procurados

Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Componentssonumanoj
 
Lightning web components
Lightning web components Lightning web components
Lightning web components Cloud Analogy
 
Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Roy Gilad
 
[Workshop] Single Sourcing with the Technical Communication Suite: Using Fram...
[Workshop] Single Sourcing with the Technical Communication Suite: Using Fram...[Workshop] Single Sourcing with the Technical Communication Suite: Using Fram...
[Workshop] Single Sourcing with the Technical Communication Suite: Using Fram...Scott Abel
 
WP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightWP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightMICTT Palma
 
Controllers and context programming
Controllers and context programmingControllers and context programming
Controllers and context programmingKranthi Kumar
 
LotusUserGroup.org Virtual User Group Meeting - The Real World Integration
LotusUserGroup.org Virtual User Group Meeting - The Real World IntegrationLotusUserGroup.org Virtual User Group Meeting - The Real World Integration
LotusUserGroup.org Virtual User Group Meeting - The Real World IntegrationJohn Head
 
Best practices for upgrading vb 6.0 projects to vb.net
Best practices for upgrading vb 6.0 projects to vb.netBest practices for upgrading vb 6.0 projects to vb.net
Best practices for upgrading vb 6.0 projects to vb.netajmal_fuuast
 
FlexNet Delivery and FlexNet Operations On-Demand Tips & Tricks
FlexNet Delivery and FlexNet Operations On-Demand Tips & TricksFlexNet Delivery and FlexNet Operations On-Demand Tips & Tricks
FlexNet Delivery and FlexNet Operations On-Demand Tips & TricksFlexera
 

Mais procurados (11)

Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
 
Lightning web components
Lightning web components Lightning web components
Lightning web components
 
Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)
 
[Workshop] Single Sourcing with the Technical Communication Suite: Using Fram...
[Workshop] Single Sourcing with the Technical Communication Suite: Using Fram...[Workshop] Single Sourcing with the Technical Communication Suite: Using Fram...
[Workshop] Single Sourcing with the Technical Communication Suite: Using Fram...
 
Lightning Web Component - LWC
Lightning Web Component - LWCLightning Web Component - LWC
Lightning Web Component - LWC
 
WP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightWP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a Silverlight
 
Controllers and context programming
Controllers and context programmingControllers and context programming
Controllers and context programming
 
LotusUserGroup.org Virtual User Group Meeting - The Real World Integration
LotusUserGroup.org Virtual User Group Meeting - The Real World IntegrationLotusUserGroup.org Virtual User Group Meeting - The Real World Integration
LotusUserGroup.org Virtual User Group Meeting - The Real World Integration
 
Best practices for upgrading vb 6.0 projects to vb.net
Best practices for upgrading vb 6.0 projects to vb.netBest practices for upgrading vb 6.0 projects to vb.net
Best practices for upgrading vb 6.0 projects to vb.net
 
FlexNet Delivery and FlexNet Operations On-Demand Tips & Tricks
FlexNet Delivery and FlexNet Operations On-Demand Tips & TricksFlexNet Delivery and FlexNet Operations On-Demand Tips & Tricks
FlexNet Delivery and FlexNet Operations On-Demand Tips & Tricks
 
Jmp108
Jmp108Jmp108
Jmp108
 

Semelhante a Skinning in Flex 4

Exploring Adobe Flex
Exploring Adobe Flex Exploring Adobe Flex
Exploring Adobe Flex senthil0809
 
Flex In Portal Final
Flex In Portal   FinalFlex In Portal   Final
Flex In Portal FinalSunil Patil
 
Building Cool apps with flex
Building Cool apps with flexBuilding Cool apps with flex
Building Cool apps with flexJoseph Khan
 
Introduction To Flex
Introduction To FlexIntroduction To Flex
Introduction To FlexYoss Cohen
 
Flex 4 Skinning - Nashville Flex Camp
Flex 4 Skinning - Nashville Flex CampFlex 4 Skinning - Nashville Flex Camp
Flex 4 Skinning - Nashville Flex CampMike Orth
 
Flex_rest_optimization
Flex_rest_optimizationFlex_rest_optimization
Flex_rest_optimizationKhou Suylong
 
Building Data Centric Apps in WPF
Building Data Centric Apps in WPFBuilding Data Centric Apps in WPF
Building Data Centric Apps in WPFFrank La Vigne
 
JavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern ImplementationJavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern Implementationdavejohnson
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsFlorian Weil
 
Flex 4 Deep Dive
Flex 4 Deep DiveFlex 4 Deep Dive
Flex 4 Deep DiveEffective
 
Flex 4 Deep Dive
Flex 4 Deep DiveFlex 4 Deep Dive
Flex 4 Deep DiveEffectiveUI
 
Yahoo Mobile Widgets
Yahoo Mobile WidgetsYahoo Mobile Widgets
Yahoo Mobile WidgetsJose Palazon
 
Flex For Flash Developers Ff 2006 Final
Flex For Flash Developers Ff 2006 FinalFlex For Flash Developers Ff 2006 Final
Flex For Flash Developers Ff 2006 Finalematrix
 

Semelhante a Skinning in Flex 4 (20)

Exploring Adobe Flex
Exploring Adobe Flex Exploring Adobe Flex
Exploring Adobe Flex
 
Flex In Portal Final
Flex In Portal   FinalFlex In Portal   Final
Flex In Portal Final
 
Building Cool apps with flex
Building Cool apps with flexBuilding Cool apps with flex
Building Cool apps with flex
 
Introduction To Flex
Introduction To FlexIntroduction To Flex
Introduction To Flex
 
Flex 4 Skinning - Nashville Flex Camp
Flex 4 Skinning - Nashville Flex CampFlex 4 Skinning - Nashville Flex Camp
Flex 4 Skinning - Nashville Flex Camp
 
Test
TestTest
Test
 
Flex_rest_optimization
Flex_rest_optimizationFlex_rest_optimization
Flex_rest_optimization
 
Custom PrimeFaces components
Custom PrimeFaces componentsCustom PrimeFaces components
Custom PrimeFaces components
 
Building Data Centric Apps in WPF
Building Data Centric Apps in WPFBuilding Data Centric Apps in WPF
Building Data Centric Apps in WPF
 
JavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern ImplementationJavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern Implementation
 
Adobe Flex4
Adobe Flex4 Adobe Flex4
Adobe Flex4
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, traps
 
Flex 4 Deep Dive
Flex 4 Deep DiveFlex 4 Deep Dive
Flex 4 Deep Dive
 
Flex 4 Deep Dive
Flex 4 Deep DiveFlex 4 Deep Dive
Flex 4 Deep Dive
 
BluePrint Mobile Framework
BluePrint Mobile FrameworkBluePrint Mobile Framework
BluePrint Mobile Framework
 
Yahoo Mobile Widgets
Yahoo Mobile WidgetsYahoo Mobile Widgets
Yahoo Mobile Widgets
 
Flex For Flash Developers Ff 2006 Final
Flex For Flash Developers Ff 2006 FinalFlex For Flash Developers Ff 2006 Final
Flex For Flash Developers Ff 2006 Final
 
Migration from ASP to ASP.NET
Migration from ASP to ASP.NETMigration from ASP to ASP.NET
Migration from ASP to ASP.NET
 
HTML5 Fundamentals
HTML5 FundamentalsHTML5 Fundamentals
HTML5 Fundamentals
 
Rendering The Fat
Rendering The FatRendering The Fat
Rendering The Fat
 

Último

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 

Último (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Skinning in Flex 4

  • 1. Skinning in Flex 4 Saurabh Narula http://blog.saurabhnarula.com/ http://twitter.com/saurabhnarula
  • 2.
  • 6. Example of skinning in flex 3 A Button Control Up over down State Skin Property Down DownSkin over overSkin up upSkin disabled disabledSkin selectedDisabled selectedDisabledSkin selectedDown selectedDownSkin selectedOver selectedOverSkin selectedUp selectedUpSkin
  • 7. 1. Create a Skin (types of skins) graphical skins programmatic skins Stateful skins 2. Assign a skin to a component by style properties (CSS). 3. Set a style property by MXML tag properties, the StyleManager class (runtime), <mx:Style> blocks, or CSS
  • 9. why a new paradigm of Skinning in Flex 4?
  • 10. Designer – Developer interaction? Full fledged, customized look & feel hard to achieve Expectation of knowledge about how components are structured, should know actionscript As a result ..
  • 11. Skinning becomes time consuming Design requirements change -> more effort to include updates spend more time in the code to meet the design change As a result ..
  • 13. Components in Flex 3 In Halo, Components were rigid. Hard to Extend. Monkey Patching.
  • 14. Components in Flex 4 Separation of data, logic, behavior from visuals, states, animation and layout Write component logic with no assumption about the appearance and vice versa. M Architecture inside your component C V
  • 15. MVC in a button M label:String, selected:Boolean text field, icon, background mouse handlers, selection logic C V
  • 16. Halo Component V Skin (Background) Extend the view M C V
  • 17. Spark Component V Skin (Entire View) M C
  • 18. Example: Button with Two icons Extend viewIconForPhase Halo Spark Extend layoutContents ActionScript knowledge Copy MXML from default Button Skin Two Image tags Adjust position/size of icons and label Done! - All MXML!
  • 19. Skin Component Relationship Component V Skin (Entire View) Skinning Contract M C
  • 20.
  • 21. Usage Scenarios - User (developer) A User (developer) wants to change the look and feel of a button Create a button skin in MXML MXML can be generated / modified with the help of a tool No actionscript
  • 22. Usage Scenarios - Developer (creator) A Developer create a custom component that he wants to sell to other customers Extend SkinnableComponent , spark component lifecycle Skinning this component is now easy
  • 23. Usage Scenarios - Designer A Designer wants to earn some extra money Package Skins into SWC and sell Change CSS and make use of these skins
  • 24. Each component contains four conceptual pieces: model, skin, controller, and view-specific logic
  • 25. Block layout for skinnable component Skins are associated through CSS
  • 26. Skinning Contract association between a component and its skin A valid contract contains Skin parts Skin states Host Component
  • 27. Skinning Contract .. The Component Class must .. Assign a skin class Identify the Skin Parts Identify the Skin States The Skin Class must .. Define the Host Component Declare Skin States , and define their appearance Define the appearance of the Skin Parts
  • 28. Demo Skinning contract in a button
  • 30.  
  • 32.
  • 33. FXG .. use a graphics tool such as PhotoShop or Illustrator to export an FXG document use the FXG document as a component in your Flex application FXG components are highly optimized cannot reference instances of objects within the FXG document from the application or other components Can not add Actionscript or mxml code Example - <Rect>
  • 34. MXML Graphics write MXML graphics code in Flash Builder add interactivity to MXML graphics - they use classes in the Flex SDK that are subclasses of GraphicElement result is not as optimized as FXG MXML graphics, the tags are mapped to their ActionScript equivalent classes More Control over graphic elements Example - <s:Rect>
  • 35. FXG and MXML graphics define the following: Graphics and text primitives Fills, strokes, gradients, and bitmaps Support for filters, masks, alphas, and blend modes
  • 36. FXG FXG FXG FXG FXG Designer - Developer Workflow FXG FXG
  • 37.
  • 38. FXG Simple Shape primitives (Rectangles, rounded rects, ellipses, circles) Complex Paths (Linear, Quadratic, and Bezier curve segments) Full range of fills and strokes (solid, transparent, bitmap, linear and radial gradients) Masking, filters, blend modes, and more. (blur, glow, dropshadow, screen, multiply…) Color and 2D transformations (rotate, scale, tint, brighten…) Integrated text, bitmaps
  • 39. Demo Writing a Custom Skinnable component QoutesBoard Component Qoutes Board/Group – A Static Part Qoute – dynamic Part Label Display – dynamic Part Close Button – dynamic part
  • 40. Credits and References http://opensource.adobe.com/wiki/display/flexsdk/Gumbo#Gumbo-DocumentsandSpecifications http://www.slideshare.net/rjowen/flex-4-overview http://weblog.mrinalwadhwa.com/
  • 41. Questions ? Thank you. Saurabh Narula http://blog.saurabhnarula.com/ http://twitter.com/saurabhnarula
  • 42.
  • 43.
  • 44. States .. (comparison) Flex 3 - addchild equivalent <mx:Application xmlns:mx=&quot; http://www.adobe.com/2006/mxml &quot; layout=&quot; absolute &quot; > <mx:states> <mx:State name=&quot; newCheckbox &quot; > <mx:AddChild relativeTo=&quot; { vbox } &quot; > <mx:CheckBox id=&quot; checkbox &quot; label=&quot; Checkbox &quot; /> </mx:AddChild> </mx:State> <mx:State name=&quot; newTextArea &quot; basedOn=&quot; newCheckBox &quot; > <mx:AddChild relativeTo=&quot; { vbox } &quot; > <mx:TextArea id=&quot; textarea &quot; /> </mx:AddChild> </mx:State> </mx:states> <mx:VBox id=&quot; vbox &quot; > <mx:Button label=&quot; Click &quot; click=&quot;currentState= 'newCheckbox' &quot; /> <mx:Button label=&quot; Click &quot; click=&quot;currentState= 'newTextArea' &quot; /> </mx:VBox> </mx:Application>
  • 45. States .. (comparison) Flex 4 - addchild equivalent <mx:Application xmlns:mx=&quot; library:ns.adobe.com/flex/halo &quot; xmlns:m=&quot; http://ns.adobe.com/mxml/2009 &quot; layout=&quot; absolute &quot; > <m:states> <m:State name=&quot; default &quot; /> <m:State name=&quot; newCheckbox &quot; /> <m:State name=&quot; newTextArea &quot; /> </m:states> <mx:VBox> <mx:Button label=&quot; Click &quot; click=&quot; currentState='newCheckbox' &quot; /> <mx:Button label=&quot; Click &quot; click=&quot; currentState='newTextArea' &quot; /> <mx:CheckBox id=&quot; checkbox &quot; label=&quot; Checkbox &quot; includeIn=&quot; newCheckbox, newTextArea &quot; /> <mx:TextArea id=&quot; textarea &quot; includeIn=&quot; newTextArea &quot; /> </mx:VBox> </mx:Application>
  • 46. States .. (comparison) Flex 3 - child insertion <mx:Application xmlns:mx=&quot; http://www.adobe.com/2006/mxml &quot; layout=&quot; absolute &quot; > <mx:states> <mx:State name=&quot; newTextInput &quot; > <mx:AddChild relativeTo=&quot; { checkbox1 } &quot; position=&quot; after &quot; > <mx:TextInput id=&quot; textinput &quot; /> </mx:AddChild> </mx:State> </mx:states> <mx:VBox id=&quot; vbox &quot; > <mx:CheckBox id=&quot; checkbox1 &quot; label=&quot; One &quot; /> <mx:CheckBox id=&quot; checkbox2 &quot; label=&quot; Two &quot; /> <mx:Button id=&quot; button &quot; label=&quot; Click &quot; click=&quot;currentState= 'newTextInput' &quot; /> </mx:VBox> </mx:Application>
  • 47. States .. (comparison) Flex 4 - child insertion <mx:Application xmlns:mx=&quot; library:ns.adobe.com/flex/halo &quot; xmlns:m=&quot; http://ns.adobe.com/mxml/2009 &quot; layout=&quot; absolute &quot; > <m:states> <m:State name=&quot; default &quot; /> <m:State name=&quot; newTextInput &quot; /> </m:states> <mx:VBox> <mx:CheckBox label=&quot; One &quot; /> <mx:TextInput includeIn=&quot; newTextInput &quot; /> <mx:CheckBox label=&quot; Two &quot; /> <mx:Button id=&quot; button &quot; label=&quot; Click &quot; click=&quot; currentState='newTextInput' &quot; /> </mx:VBox> </mx:Application>
  • 48. States .. (comparison) Flex 3 - A RemoveChild Equivalent <mx:Application xmlns:mx=&quot; http://www.adobe.com/2006/mxml &quot; layout=&quot; absolute &quot; > <mx:states> <mx:State name=&quot; noCheckboxes &quot; > <mx:RemoveChild target=&quot; { checkbox1 } &quot; /> <mx:RemoveChild target=&quot; { checkbox2 } &quot; /> </mx:State> </mx:states> <mx:VBox id=&quot; vbox &quot; > <mx:CheckBox id=&quot; checkbox1 &quot; label=&quot; One &quot; /> <mx:CheckBox id=&quot; checkbox2 &quot; label=&quot; Two &quot; /> <mx:Button id=&quot; button &quot; label=&quot; Click &quot; click=&quot;currentState= 'noCheckboxes' &quot; /> </mx:VBox> </mx:Application>
  • 49. States .. (comparison) Flex 4 - A RemoveChild Equivalent <mx:Application xmlns:mx=&quot; library:ns.adobe.com/flex/halo &quot; xmlns:m=&quot; http://ns.adobe.com/mxml/2009 &quot; layout=&quot; absolute &quot; > <m:states> <m:State name=&quot; default &quot; /> <m:State name=&quot; noCheckboxes &quot; /> </m:states> <mx:VBox id=&quot; vbox &quot; > <mx:CheckBox label=&quot; One &quot; excludeFrom=&quot; noCheckboxes &quot; /> <mx:CheckBox label=&quot; Two &quot; includeIn=&quot; default &quot; /> <!-- Works as above --> <mx:Button id=&quot; button &quot; label=&quot; Click &quot; click=&quot; currentState='noCheckboxes' &quot; /> </mx:VBox> </mx:Application>
  • 50. Data
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56. CSS Changes and Advanced Selectors
  • 57. CSS Changes and Advanced Selectors .. Demo
  • 58. Containers and Layouts Group Lowest level container in Spark framework Supports both UIComponents and GraphicElements Only the bare essentials: Layout (through delegates) Containment Basic Flash player features (transforms, etc.) DataGroup The basis of any “List” based container Anything that uses ItemRenderers In Spark, everything displayable resides in a Group
  • 60. Containers and Layouts .. layouts have been separated from the containers When a Spark container measure() or updateDisplayList() method is called, the task of measurement and child arrangement is promptly delegated to a Spark layout instance Assignable and custom Layouts All layout classes extend LayoutBase VerticalLayout, HorizontalLayout, TileLayout, BasicLayout (Canvas) Basis of layout for all containers, lists, skins, etc. The goal: clean layout, easy extension, consistent behavior Big difference: layouts can support transforms Even though containers support clipping and scrolling, they don't put up scrollbars automatically like Halo does
  • 61. Containers and Layouts .. Custom Layout Demo

Notas do Editor

  1. Not gonna talk about styling, though skinning is the next step after styling. Skinning is the process of changing the appearance of a component by modifying or replacing its visual elements. These elements can be made up of bitmap images, SWF files, or class files that contain drawing methods that define vector images. Skins can define the entire appearance, or only a part of the appearance, of a component in various states. Change visual appearance - Stlyling – css etc. Example – humans have skin, but have different color of skins.
  2. Styling - When you want to customize the appearance of a Flex component, you have two options. One is to tweak the default appearance of the component using styling . Each Flex component has an extensive set of style properties you can set to change its appearance: the roundness of corners, the colors used for fill gradients, the font, color, and size of text, and so on. If you find that you can’t achieve the look that you want purely through styling, or if you just want to draw the appearance rather than tweaking a bunch of knobs, then you can use Adobe design tools to draw graphical skins for your components. Skins allow you to completely customize the appearance of a component.
  3. The default skins for the up, over, and down states appear as follows(in the image) Other controls have similar states with associated skins. For example, RadioButton controls, which are subclasses of Button, also have up, down, and over skins. The ComboBox control has skins the define the appearance of the control when it is in the disabled, down, and over states.
  4. This slide really sums up how skinning is done in flex 3. Stateful skins – define a skin that defines each state of the component programmatic skins – ActionScript or MXML classes graphical skins – bitmap images or swf files
  5. Although embedding styling declarations directly into MXML files or ActionScript code is a powerful concept, but such techniques provide limited interaction between designers and Flex developers. And so full-fledged, customized look-and-feels for a Flex application ( are ) were still hard to achieve. For example, you want to create a button that performs a cross-fade from the Up state to the Over state as you roll mouse over it. In Flex 3, this is not a built-in behavior of the Button component. To implement the design requirement, you would have to first create a new programmatic skin that handles the different state changes; the skin is also responsible for managing the tween to create the fade. This is by no means a simple feat to accomplish, and for a developer, this could take anywhere from a few hours to a few days depending on your understanding of the component structure and how complex the design requirements are. Because Flex 3 requires a lot of code to solve a rather simple design requirement, we have seen the process of skinning components become one of the most time-consuming processes of Flex development. The further the design pushes away from the default UI behavior, the more time and development investment is required. This also means that as design requirements change, a project involves much more than simply updating the UI. Often you have to spend more time in the code to meet the design change.
  6. Because Flex 3 requires a lot of code to solve a rather simple design requirement, we have seen the process of skinning components become one of the most time-consuming processes of Flex development. The further the design pushes away from the default UI behavior, the more time and development investment is required. This also means that as design requirements change, a project involves much more than simply updating the UI. Often you have to spend more time in the code to meet the design change.
  7. Monkey Patching to achieve desired changes to the component view.
  8. Separate data, logic and behavior from visuals, states, animation and layout
  9. text field, icon, background
  10. Copy MXML from default Button Skin Add two tags to create two icons Adjust position/size of icons and label All MXML! Extend viewIconForPhase &amp; duplicate logic for new icon ~100 lines Extend layoutContents to position/size new icon and position/size existing components so nothing overlaps Requires ActionScript knowledge and understanding of Button component
  11. Single, consistent mechanism for all skins - skinning a Button is the same as skinning a List item. Formal mechanism for skinning composite components through skin parts. Declarative control of all visual aspects of components so it can be easily created and manipulated by tools
  12. A user is creating an application and wants to change the look and feel of an Button. Without having to write any ActionScript code, he creates a new ButtonSkin to use within his application. Because this skin file is MXML, a tool can be used to create/modify it; also, it&apos;s easy for a designer to come up with one or modify an existing one to suit their needs.
  13. A developer is creating a custom component that he wants to sell to other customers. However, he wants the user to be able to modify the look and feel of the component. By extending SkinnableComponent and hooking into the SkinnableComponent lifecycle, the developer ensures skinning will be easy for the users.
  14. A designer is looking to pocket some extra money on the side. He decides to create a set of skins for Flex components and packages them up in a SWC that he sells to other Flex application developers. The application developers change some CSS and start using the new skins.
  15. Each component contains four conceptual pieces: model, skin, controller, and view-specific logic. The model contains the properties and business logic for the component. For example, a Range model has properties for minimumValue, maximumValue, stepSize, etc., and methods for stepping by a line or a page. The model does not contain any visual or behavioral information. The skin defines the visual elements of the component. The controller is the interface between the skin and the model. It has several key functions: * Defining the component behavior. For example, the Button controller has all of the mouse event handling logic. * Defining the visual states of the component. * Defining the parts of a component. For example, an FxScrollBar controller has 4 parts: up arrow, down arrow, thumb, and track. The view-specific logic helps position and size the different parts of a skin. For example, FxHScrollBar and FxVScrollBar have different view-specific logic which determine the position of the thumb. To make a circular scrollbar one would have to override this logic. A skinnable component is one whose skin can be changed during authoring or at runtime.
  16. Putting the pieces together * The model and controller are typically written in ActionScript * Inheritance should be used to separate the model from the controller. In the framework, we try to do this; however, the distinction between model and controller can sometimes be unclear, especially when the model is a UI element. This is not a hard rule that one always needs to follow, but it is a recommendation when possible. * The skin is typically written in MXML. * The view-specific logic could be written in the skin file; however, most of the time the logic should be put into the component itself, or a subclass of the component, because lots of people need that logic and it makes skinning easier. An example of this is FxScrollBar-&gt;FxHScrollBar or FxScrollBar-&gt;FxVScrollBar. * For skinnable components, skins are associated through CSS
  17. To establish association between a component and its skin , we need some sort of an agreement or contract
  18. http://www.adobe.com/devnet/flex/articles/flex4_skinning.html
  19. Adding graphics to your Flex applications can make them more attractive and usable. In many cases, you might want to add graphics that are vector-based, and not import images that don’t scale well. You can create vector based graphics in Flex by using one of the following APIs: FXG MXML Graphics FXG is a declarative syntax for defining static graphics. You typically use a graphics tool such as PhotoShop or Illustrator to export an FXG document, and then use the FXG document as a component in your Flex application. FXG components are highly optimized. MXML graphics, on the other hand, are a collection of classes that you use to define interactive graphics. You typically write MXML graphics code in Flash Builder. You can add interactivity to MXML graphics code because they use classes in the Flex SDK that are subclasses of GraphicElement. The result is not as optimized as FXG. The amount of interactivity when using FXG and MXML graphics is different. If you use MXML graphics, the tags are mapped to their ActionScript equivalent classes. You can reference the MXML graphic elements and have greater control over them. If you use FGX, then you cannot reference instances of objects within the FXG document from the application or other components. In addition, you cannot add MXML code to it, nor can you add ActionScript. FXG and MXML graphics define the following:Graphics and text primitives Fills, strokes, gradients, and bitmaps Support for filters, masks, alphas, and blend modes FXG and MXML graphics share very similar syntax. For example, in FXG, you can define a rectangle with the &lt;Rect&gt; element. In MXML graphics, you use the &lt;s:Rect&gt; tag. Most FXG elements have MXML graphics equivalents. FXG and MXML graphics do not share the same namespace. MXML graphics use the MXML namespace of the containing document. In most cases, this is the Spark namespace. FXG uses its own namespace.
  20. http://www.adobe.com/devnet/flex/articles/flex4_skinning.html
  21. States in Flex 4 are awesome Declare your states with a ‘State’ tag Describe ‘alternate views’ of your markup Change values, bindings, event handlers Include and exclude components as easily as setting visibility Unscoped entries specify the ‘default’ for all states States can be grouped into State Groups - see Flex documentation for more info &lt;fx:Reparent&gt; tag to move children between states WARNING: Use NEW STATES in 2009 documents – 2006 still supports legacy states.
  22. push method means taking a property from the component and stuffing it into the appropriate skin slot. On the other hand, if the skin asked the host component what the property value was, that would be the pull method.