Archive for the 'Tips' Category

Jan 04 2010

Using AspireUI Components with MDM Zinc 3.0

Published by sunny under Aspire UI, Flash, Tips

MDM Zinc™ 3.0 is a feature-rich Rapid Application Development Tool for turning SWFs into stunning commercial cross-platform desktop applications, screensavers, widgets, CD roms, DVD’s, kiosks and more. The AspireUI AS3 library uses PNG image files for component skinning, and this ease of skinning is a good fit for Zinc™ 3.0 projects, especially if you would like to create applications that look like native desktop applications. The toolkit currently comes with four component themes – “classic”, “xp”, “vista” and “graylic”. The first three aforementioned themes are Windows OS lookalike themes.

In this short tutorial, we will look at how you can use the AspireUI library in Zinc™ 3.0 projects, and how you can easily swap component themes by simply changing one line of code.

Continue Reading »

No responses yet

Dec 17 2009

Small Caps Fonts

Published by sunny under Others, Tips

In typography, “small caps” refer to uppercase (capital) characters used in-lieu of lowercase (small) characters, where these uppercase characters are set at the same height as the lowercase characters.

Small caps are typically used for titles, headlines, column headings, etc. They are also good for any text that you would usually use all capitals. This is because the use of small caps makes the run of capital letters seem less jarring, and would also often require less space than all caps.

While many word processors and text formatting systems include an option to format text in small caps (which leaves uppercase letters as they are but converts lowercase letters to small caps), this is a feature that is lacking in most graphics editing software.

Some fonts have inherent small caps, ie they use smaller capital letters in place of the lowercase characters. These fonts are useful when you wish to use small caps to bring distinction to your designs.

Here are some fonts with inherent small caps:

Continue Reading »

No responses yet

Dec 13 2009

[AS3] Serializing A Bundle Of Bitmaps As Data Objects

Published by sunny under Flash, Tips

This post is a supplement to “Serializing Bitmaps (Storing BitmapData As Raw Binary/ByteArray)”. In that article, we looked at how to convert BitmapData to a ByteArray, save that ByteArray, and re-construct the BitmapData from the saved ByteArray.

It is important to note that the technique saves the ByteArray “as is” in a flat binary file without any header or any block of metadata – this means that the file will in itself not be able to communicate its data structure and therefore, proper usage of the data requires prior knowledge of how the data has been packed (we used the first four bytes for storing the value of the width of the image). As a result, that method may be deemed as an “unorthodox” hack and unsuitable in team development.

In this post, we look at how you can employ the same basic idea while making the saved data more “consumable” by other developers.

Continue Reading »

No responses yet

Dec 12 2009

uiWindow: Background Drop Shadow + Glow Effect

Published by sunny under Aspire UI, Flash, Tips

The default behavior of the uiWindow container is to cast a drop shadow when it is active in the foreground, and not do so when it is inactive or when it is maximized to fill the stage. This behavior is determined by the component instance’s background property value.

Continue Reading »

No responses yet

Dec 04 2009

uiImage: Preloading External Bitmap Images

Published by sunny under Aspire UI, Tips

The uiImage class is used to display an image, the source of which can either be a MovieClip symbol in the library, or an external SWF/GIF/JPG/PNG file.

When using external bitmap images (GIF/JPG/PNG), the uiImage class will load from the external source only once and use cached data if the same source is requested subsequently again by the same or other uiImage instances. This is efficient because the same BitmapData is used across different uiImage instances that use the same image source. This is why image icons in Aspire UI scrollable lists do not suffer from the “flickering” symptom (which you will experience when using Flash/Flex components).

Continue Reading »

No responses yet

Dec 04 2009

[AS3] Embedding Binary XML

Published by sunny under Flash, Tips

This post is a supplement to “Saving XML As Binary”. I neglected to mention in that post that you can, if so desired, embed the binary XML within your SWF instead of loading it during run-time. That means you still get to keep the XML externally, not as part of your application code, so that the code and data can still be kept separate and maintained more easily.

However, it must be mentioned that embedding a text XML within SWF will get it compressed as part of the SWF compression anyway. Therefore, if compression is the only motivation, don’t convert the XML to binary and embed the binary version – it does not make sense. But if you wish to do some data encryption, then the additional work may be appropriate.

Continue Reading »

2 responses so far

Dec 03 2009

[AS3] Serializing Bitmaps (Storing BitmapData As Raw Binary/ByteArray)

Published by sunny under Flash, Tips

Whenever an application needs to save bitmap images to local storage or post them to a server script, a common practice is to encode the image as JPEG or PNG before sending that binary data off as the respective mimeType. However, if the intention is simply to save the bitmap image, ie to serialize the BitmapData, then converting the image to JPEG/PNG would actually be unnecessary.

Continue Reading »

4 responses so far

Nov 19 2009

uiModel: Using External XML As Data Source During Run-Time

Published by sunny under Aspire UI, Flash, Tips

The com.ghostwire.ui.data.uiModel class is used to represent a collection of items used as data source for various components in the Aspire UI library. Data-driven components such as the uiComboBox, uiListBox, uiMenu, uiMenuBar, and uiTabView are populated using uiModel objects.

A uiModel object can be populated using an array of data objects (duplicates will be ignored), an array of strings, or an XML object. When populating using XML, the XML can either be embedded with the rest of your application code, or loaded from an external XML file during run-time.

Continue Reading »

One response so far

Nov 18 2009

[AS3] Drawing Outline on Text Glyphs

Published by sunny under Flash, Tips

Here is how you can draw an outline on text glyphs during run-time via ActionScript. This method works with embedded as well as non-embedded fonts.

Continue Reading »

No responses yet

Nov 16 2009

[AS3] Applying ROT128 Encryption On Binary XML

Published by sunny under Flash, Tips

This is Part III of our discussion on ROT128 Encryption.

Part I: “Applying ROT128 Encryption On ByteArray”
Part II: “Applying ROT128 Encryption On Embedded/Module SWFs”

In “Saving XML As Binary”, we looked at how text XML can be stored in a ByteArray object so that it can be compressed and made non-human-readable. In this post, we look at how you can integrate ROT128 into the XML-to-ByteArray-to-XML routines. Binary XML is used only as an example; you can definitely apply the same concept to other binary data.

Continue Reading »

2 responses so far

Next »