7. Content
• https://github.com/tpryan/SkinExample
– Complete, no shortcuts
• https://github.com/tpryan/SkinExampleExercise
– Finished version of class exercise but incomplete due
to shortcuts
• https://github.com/tpryan/SkinExampleStarted
– Starting point for class
16. StylableTextField
• Lightweight
• Can be Styled
• Can used for editable and static text
• It can’t be used in MXML markup though
17. BitmapImage
• Lightweight image component
• Doesn’t have ability to load dynamic
content… yet.
• This is fine, skin assets should be
embedded
• Fast performing
29. Important Methods
• Constructor
– Very beginning
– No Children available
– Good for manipulating “this” and setting variables
• onChildrenCreate
– After everything is done setting up
– Good for set once display properties
• layoutContents
– After any thing that requires a redistribution of
elements
– Good for reacting to location and content
changes
36. Assigning a Skin in CSS
s|ViewNavigatorApplication{
skinClass: ClassReference("skins.AppSkin");
}
37. Why
• Prevents you from cluttering up Flex with
presentational information
38. Dealing with DPI
switch (applicationDPI)
{
case 320:
{
break;
}
case 240:
{
break;
}
default:
{
break;
}
}
39. Why
• Custom graphics look like crap if you
design for too small a screen.
• But smaller DPI devices are usually less
powerful meaning pushing around larger
images is ineffiecient
48. Font Recap
• There are 2 font rendering engines in
Flash
• This means 2 ways of embedding fonts
– TLF
– NonTLF
• Most Mobile components use NonTLF
• Label uses TLF
49. Consequence
• You have to embed both TLF and NonTLF
fonts
• You can do this with Metadata
• I’ve never done it that way
• Because Flash Professional makes this
very easy
67. Typical Process
• Remove the background
• Slap in graphics
• Account for DPI
• Account for redraws
68. Good resources
• Deep Dive Into Flex Mobile Item
Renderers
– http://www.slideshare.net/JasonHanson/deep-
dive-into-flex-mobile-item-renderers-7501594
• Jason San Jose
– http://www.adobe.com/devnet/flex/articles/mo
bile-skinning-part1.html
– http://www.adobe.com/devnet/flex/articles/mo
bile-skinning-part2.html
– http://www.adobe.com/devnet/flex/articles/mo
69. Follow up?
• Feel free to contact me
– terry.ryan@adobe.com
– http://terrenceryan.com
– Twitter: @tpryan