flex components slides

Information about flex components slides

Published on November 28, 2007

Author: Nikita

Source: authorstream.com

Content

Flex Component Development:  Flex Component Development Basic Lifecycle:  Basic Lifecycle Constructor parent.addChild() createChildren() Invalidation and Validation commitProperties() measure() updateDisplayList() parent.removeChild() Garbage Collection Constructor:  Constructor Add event listeners. Override properties. Nothing else. createChildren():  createChildren() Called only once. Instantiate children that never change. May override children from superclasses. createChildren() Example:  createChildren() Example override protected function createChildren():void { if(!this.subComponent) { this.subComponent = new MyCustomComponent(); this.addChild(this.subComponent); } super.createChildren(); if(!this.textField) { this.textField = new TextField(); this.addChild(this.textField); } } Invalidation and Validation:  Invalidation and Validation Properties invalidateProperties() commitProperties() Dimensions invalidateSize() measure() Display invalidateDisplayList() updateDisplayList() Invalidation Example:  Invalidation Example private var _someParam:Number = 0; private var _someParamChanged:Boolean = false; public function get someParam():Number { return this._someParam; } public function set someParam(value:Number):void { this._someParam = value; this._someParamChanged = true; this.invalidateProperties(); } Validation Example:  Validation Example override protected function commitProperties():void { super.commitProperties(); if(this._someParamChanged) { // do something this._someParamChanged = false; } } Component Measurement:  Component Measurement measure() measuredWidth setActualSize() getExplicitOrMeasuredWidth() updateDisplayList() unscaledWidth Metadata:  Metadata Events [Event(name=“itemRollOver”, type=“com.yahoo.astra.fl.events.TabBarEvent”)] Styles [Style(name=“contentPadding”, type=“Number”)] Please note: Both types are required for use in MXML. Default Styles (Required CSS File):  Default Styles (Required CSS File) customlist.css: MyCustomList { paddingLeft: 10 paddingRight: 10; paddingTop: 5; paddingBottom: 5; } MyCustomListItemRenderer { backgroundColor: #ffffff; } Default Styles (Static Initializer):  Default Styles (Static Initializer) private static function initializeStyles():void { var selector:CSSStyleDeclaration = StyleManager.getStyleDeclaration(“MyCustomList"); if(!selector) { selector = new CSSStyleDeclaration(); } selector.defaultFactory = function():void { this.paddingLeft = 10; } StyleManager.setStyleDeclaration("TreeMap", selector, false); } initializeStyles(); //call immediately Yahoo! Flash Platform:  Yahoo! Flash Platform Yahoo! Flash Developer Network: http://developer.yahoo.com/flash/ Mailing List: http://tech.groups.yahoo.com/groups/ydn-flash/ Blog: http://www.yswfblog.com/

Related presentations


Other presentations created by Nikita

Modems
28. 11. 2007
0 views

Modems

Intro to CMMI
02. 10. 2007
0 views

Intro to CMMI

Mantsch Mazur Tank Insulation
06. 11. 2007
0 views

Mantsch Mazur Tank Insulation

embrapa2
27. 11. 2007
0 views

embrapa2

G050249 00
28. 11. 2007
0 views

G050249 00

csw06 lord
25. 10. 2007
0 views

csw06 lord

AboutCaravaggio
31. 10. 2007
0 views

AboutCaravaggio

THE RENAISSANCE
31. 10. 2007
0 views

THE RENAISSANCE

HeWhoLaughs LastsPlenary
02. 11. 2007
0 views

HeWhoLaughs LastsPlenary

JavaScript UE1
05. 11. 2007
0 views

JavaScript UE1

buchner
05. 11. 2007
0 views

buchner

6 3 Ship Framing System
06. 11. 2007
0 views

6 3 Ship Framing System

NOROVIRUSESpres
07. 11. 2007
0 views

NOROVIRUSESpres

Volkswagen Stiftung
14. 11. 2007
0 views

Volkswagen Stiftung

Trigonometry examples
15. 11. 2007
0 views

Trigonometry examples

Lufthansa
16. 11. 2007
0 views

Lufthansa

pipeline to the pros updated
20. 11. 2007
0 views

pipeline to the pros updated

tango in a nutshell
22. 11. 2007
0 views

tango in a nutshell

en what is turtle f2f
19. 12. 2007
0 views

en what is turtle f2f

Qatar 2005
28. 12. 2007
0 views

Qatar 2005

butterflydance
23. 11. 2007
0 views

butterflydance

H3NPSmall
02. 01. 2008
0 views

H3NPSmall

nano5
02. 01. 2008
0 views

nano5

jmcmorrow
06. 12. 2007
0 views

jmcmorrow

fishing
07. 01. 2008
0 views

fishing

Dormancy
07. 01. 2008
0 views

Dormancy

TE Tutorial ACL07
31. 10. 2007
0 views

TE Tutorial ACL07

Knots A
25. 10. 2007
0 views

Knots A

Tutorial AOD 100305
29. 10. 2007
0 views

Tutorial AOD 100305

38006461
21. 11. 2007
0 views

38006461

helioseismology
14. 11. 2007
0 views

helioseismology

Knoblock p123
15. 11. 2007
0 views

Knoblock p123

Lt2 BusiPortfoAnalysis
20. 02. 2008
0 views

Lt2 BusiPortfoAnalysis

Guidaversione19 0SistemaDRG
30. 10. 2007
0 views

Guidaversione19 0SistemaDRG

Modern Ideas
24. 02. 2008
0 views

Modern Ideas

Lotrel and Diovan Talk
05. 03. 2008
0 views

Lotrel and Diovan Talk

BusinessBuddyPresent ation
03. 10. 2007
0 views

BusinessBuddyPresent ation

DFASColumbusConferen ce
01. 11. 2007
0 views

DFASColumbusConferen ce

student movement
25. 12. 2007
0 views

student movement

elettivo2006
04. 12. 2007
0 views

elettivo2006

akshaya friends
21. 12. 2007
0 views

akshaya friends

lctpcremarks
27. 03. 2008
0 views

lctpcremarks

AUTNZFuturesDWYER
30. 03. 2008
0 views

AUTNZFuturesDWYER

Lecture24 07
09. 10. 2007
0 views

Lecture24 07

Lesko Homestake Minn
05. 12. 2007
0 views

Lesko Homestake Minn

2005 FX PAL VS
01. 11. 2007
0 views

2005 FX PAL VS

Deadlock 1941
13. 11. 2007
0 views

Deadlock 1941

20070615 POLICY grid
24. 12. 2007
0 views

20070615 POLICY grid

NYU Brownbag
06. 11. 2007
0 views

NYU Brownbag

Meow
05. 11. 2007
0 views

Meow

ahm2004 workflow
14. 12. 2007
0 views

ahm2004 workflow

08Tirpak
07. 11. 2007
0 views

08Tirpak

UNFFOlgas website
26. 11. 2007
0 views

UNFFOlgas website

rtd Jul24 03
30. 11. 2007
0 views

rtd Jul24 03

Princeton Oct05
05. 11. 2007
0 views

Princeton Oct05