The following example shows how you can embed a font in the Flex Gumbo beta and use the embedded font with the new TextView class using the latest version (build 4.0.0.3616) of the beta Flex Gumbo SDK.
Full code after the jump.
The following example shows how you can embed a font in the Flex Gumbo beta and use the embedded font with the new TextView class using the latest version (build 4.0.0.3616) of the beta Flex Gumbo SDK.
Full code after the jump.
In a previous example, “Embedding fonts in a Flex application using Embed metadata”, we saw how you could embed fonts using the [Embed] metadata with the source attribute.
The following example shows how you can embed system fonts in a Flex application using the [Embed] metadata with the systemFont attribute.
Full code after the jump.
Continue reading ‘Embedding fonts in a Flex application using Embed metadata (redux)’
The following example shows how you can set a Flex Button control’s icon style to an asset from a SWF file using MXML or ActionScript.
Full code after the jump.
Continue reading ‘Setting a Button control’s icon to an asset from a SWF file in Flex’
The following example shows how you can set custom status messages in a Flex Panel container by setting the aptly named status property.
Full code after the jump.
Continue reading ‘Setting custom status messages in a Flex Panel container’
A quick example of converting an image to black and white using the ColorMatrixFilter class. This was originally written for the Flash documentation’s “Learning ActionScript 2.0″ book (click here), but I ported our sample to Flex below.
For more information on the ColorMatrixFilter in ActionScript 3.0, check out the Flex 3 Beta documentation on LiveDocs at: ColorMatrixFilter - Flex 3 Language Reference.
Continue reading ‘Converting an image to black and white using the ColorMatrixFilter’
Similar to the previous post where we covered a couple of techniques for embedding an icon into a Button control, this post explores embedding an icon into an Alert control. An icon in an Alert control appears to the left of the alert’s message text, but the second example will show how you can easily tweak the code to also add icons to the nested buttons controls within the alert dialog itself. See the full code after the jump.
There are two general methods for embedding an icon into a Button control. The first method involves creating a variable in the Flex application, and using the [Bindable] and [Embed] meta data. You specify the path to the icon in the source parameter of the Embed meta data and then to use the icon in a Button, you use data binding, which in this case would look like icon="{Icon}". The second method, embeds the icon inline in the Button tag itself, by using @Embed() and specifying the path to the image file as a parameter. See the full code after the jump.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||