Apr 09 2009
uiWindow Example using “classic” theme
One of the key features of the Aspire UI library is the ease of skinning which is done via external PNG images. These images are loaded during run-time instead of being compiled into the application SWF. Not only does it make it easy to (re)design component skins, it also makes it easy to try out different themes. As long as a theme is designed and developed correctly, an application can switch themes easily.
The following is the exact same SWF shown in the previous uiWindow Example, but this time it is rendered using the “classic” theme (included in the Aspire UI distribution):
Exact same SWF, just with an additional fvars “classic=true” set.
Within the application code, a single line of code determines which theme to use:
uiSkins.initialize(theme); |
If the uiSkins.initialize() call is omitted, the “default” theme is used.
In the example above, we use the following code to detect if the fvars is set and if so use the “classic” theme:
uiSkins.initialize(((loaderInfo.parameters.classic) ? "classic" : "default")); |
See also: uiSkins usage notes
NOTE: By deliberate design, the Aspire UI framework does not support “on-the-fly” theme changing during application run-time. A theme is fixed once the uiSkins.initialize() call is made. This is by deliberate design because, as with most desktop applications, it is better to ask end-users to “re-start” the application before effecting a new theme.
Aspire UI Components
Aspire UI is a library of Actionscript 3.0 (AS3) classes for building flexible and lightweight UI elements in Adobe Flash applications. Key features of the components include easy skinning using PNG image files, automatic tab focus ordering, CSS text styles, and layout management. This is a pure AS3 library with no dependency on the Flex framework. You may experiment with the various features by downloading a trial version.








