Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 18: Using Styles and Themes > Loading style sheets at run time - Pg. 623

ADOBE FLEX 3 633 Adobe Flex 3 Developer Guide <mx:ColorPicker id="cp" showTextField="true" change="changeHBoxStyle()" selectedColor="0x333999"/> </mx:Application> Binding a style property can be a computationally expensive operation. You should use this method of applying style properties only when absolutely necessary. Loading style sheets at run time You can load style sheets at run time by using the StyleManager. These style sheets take the form of SWF files that are dynamically loaded while your Flex application runs. By loading style sheets at run time, you can load images (for graphical skins), fonts, type and class selectors, and programmatic skins into your Flex application without embedding them at compile time. This lets skins and fonts be partitioned into separate SWF files, away from the main application. As a result, the application's SWF file size is smaller, which reduces the initial download time. However, the first time a run-time style sheet is used, it takes longer for the styles and skins to be applied than if you load styles by using the <mx:Style> tag. This is because