Flash Online Conference #10 - October 16, 2014
A look at the most important new features in Feathers 2.0, including a deep dive into the new skinning and theme architecture. Feathers is the open source user interface component library for Starling Framework. Starling and Feathers run on Adobe AIR for mobile and desktop and Adobe Flash Player in the browser.
17. Theme
• Passes global style
provider to
component class.
Component
• Defaults to global
style provider in
constructor.
Component
• Initializes when
added to stage.
Component
• Calls applyStyles() on
style provider.
Style Provider
• Sets properties on
component.
18.
19.
20.
21. var button1:Button = new Button();
button1.label = "Cancel";
// no style name
this.addChild( button1 );
var button2:Button = new Button();
button2.label = "Delete";
// the style provider will see the style name and call
// a different function
button2.styleNameList.add( "warning-button" );
button2.y = 100;
this.addChild( button2 );
22. Call component
constructor.
Add "warning-button"
string to
styleNameList
property.
Component initializes
and applyStyles() is
called on style
provider.
StyleNameFunction
style provider checks
styleNameList for
values.
If styleNameList
contains "warning-button",
call
skinWarningButton()
If no style names
match a function, fall
back to calling
skinNormalButton()
Feathers: the user interface component library for Starling Framework
http://feathersui.com/
32 primary components don’t include things like text renderers and other minor components.
See over 100 changes in the 2.0.0 release notes!
https://github.com/joshtynjala/feathers/blob/v2.0.0/RELEASENOTES.md
A blog post about the beta version with some more details:
http://joshblog.net/2014/feathers-2-preview-listening-to-feedback-improved-architecture/
The biggest change in Feathers 2.0.
Initialization happens automatically when a component is added to the stage.
You can manually initialize a component that isn't on stage by asking it to validate.
IStyleProvider interface in the Feathers API Reference:
http://feathersui.com/documentation/feathers/skins/IStyleProvider.html
FunctionStyleProvider class in the Feathers API Reference:
http://feathersui.com/documentation/feathers/skins/FunctionStyleProvider.html
FeathersControl.styleProvider property in the Feathers API Reference:
http://feathersui.com/documentation/feathers/core/FeathersControl.html#styleProvider
You can opt out of using the globalStyleProvider of a superclass by overriding the non-static defaultStyleProvider property.
Button.globalStyleProvider static property in the Feathers API Reference:
http://feathersui.com/documentation/feathers/controls/Button.html#globalStyleProvider
StyleNameFunctionStyleProvider in the Feathers API Reference:
http://feathersui.com/documentation/feathers/skins/StyleNameFunctionStyleProvider.html
FeathersControl.styleNameList property in the Feathers API Reference:
http://feathersui.com/documentation/feathers/core/FeathersControl.html#styleNameList
StyleNameFunctionStyleProvider in the Feathers API Reference:
http://feathersui.com/documentation/feathers/skins/StyleNameFunctionStyleProvider.html
FeathersControl.styleNameList property in the Feathers API Reference:
http://feathersui.com/documentation/feathers/core/FeathersControl.html#styleNameList
For a detailed review of style providers, see skinning Feathers components:
http://wiki.starling-framework.org/feathers/skinning
FeathersControl.styleProvider property in the Feathers API Reference:
http://feathersui.com/documentation/feathers/core/FeathersControl.html#styleProvider
AddOnFunctionStyleProvider class in the Feathers API Reference:
http://feathersui.com/documentation/feathers/skins/AddOnFunctionStyleProvider.html
See a video showing a 3D flip transition with ScreenNavigator using Sprite3D:
https://www.youtube.com/watch?v=mL8Ckr83Y-k
Skinning with Flash Professional inspired by this Twitter conversation:
https://twitter.com/robbienz/status/518964917525688321