In the second episode of the “Simeon Says” screencast I am joined by my friend Matt Legrand. In this session we talk about how to create a new custom TitleWindow component in Flex 4 by extending Panel and PanelSkin.
Download ( 82.93 MB 30:42)
The code I used to prepare this session is hosted on github as the Flex4TitleWindowDemo. You can view the source here. Please feel free to clone it and submit back any changes you think are appropriate. If you are not a git user, you can still download the source at that link by using the download button on github.
5 Responses to “Episode 2 – Creating the Flex 4 TitleWindow”
Powered by PNW Rain LLC


Great job Sim. It’s nice to start seeing some demos of the new component lifecycle in Flex 4. Thanks for the great series!
Great work guys, we need more ;)
I’m trying out this example with FB4 Beta 2 (and using its SDK which, I’m presuming, fixes the bug you mention in the screencast and in your Adobe forum post…I am seeing the standard Panel parts in addition to the close button).
Everything seems fine…except the background of the content area is black. I’ve tried setting (via CSS) the backgroundColor on the TitleWindow class, on the Panel class, even on the TitleWindowSkin and PanelSkin classes as a last resort, and no change.
PanelSkin.mxml binds the fill of this background Rect to {getStyle(‘backgroundColor’)}. Putting a breakpoint in the relevant call to getStyle shows that:
(a) backgroundColor is a non-inheriting style (as declared on Panel)
(b) backgroundColor does not exist on the _nonInheritingStyles object for the PanelSkin instance.
This is only the case for TitleWindows, not for Panels. _nonInheritingStyles has many other properties set, just not backgroundColor.
Has anybody else experienced this?
Background and other colors are broken styles in the Flex 4 beta2 and Gumbo build 10482. Nothing works as expected:
Isnt it best if u give us the codes so? we dont have to type eyvnethirgjust change stuff u want to keep it for you but can u give us the codes?