Archive for May, 2006

How to Use Uninstalled Fonts

Tuesday, May 9th, 2006
Flash

In Windows, installed fonts are loaded into memory as the computer boots up, and they stay loaded.  (Mac devs, let me know if things are different for you!)  Normally, this is a good thing:  fonts are instantly available in all applications; they show up in font select boxes and are easy to manipulate in terms of size and style.  But too much of anything is, well … not a good thing.  I witnessed a machine once that was bogged down with literally 2,000 installed fonts, and the developer wondered why things were running so slowly.

And yet, developer/designers need fonts!  Clients want variety.  To handle this situation, a number of font managers have sprung to life, usually shareware, that allow you to view uninstalled fonts and, with the click of a button, install and uninstall them as needed.  It’s certainly more convenient than dragging a TTF file into your Windows\fonts folder.  That may just meet your needs, but as it happens, I stumbled onto a surprisingly easy way to use uninstalled fonts without special software.  Keep reading »

Making Sense of Hexadecimal Color

Monday, May 8th, 2006
Web Development

There are quite a few ways to describe color to a computer.  Each of them is based on a particular mathematical model, usually called a color space.  Off the top of my head, I can think of RGB, HSV, CMYK, and L*a*b*, but there are plenty more, depending on the desired output (monitor, television, paper, etc.).

Until I understood hexadecimal notation, I thought “hex values” in HTML and CSS were simply another color space — one I found hard to read — but it turns out that hex is actually just RGB.  Seems preposterous, I know … until you see the connection.  So, how does something like #193A0B (a very dark green) relate to its decimal equivalent rgb(25, 58, 11)?  Let’s take a look.  Keep reading »

How to Raise Custom Events (EventDispatcher)

Saturday, May 6th, 2006
ActionScript 2.0

This article follows on the heels of How to Raise Custom Events (AsBroadcaster), so if the following paragraphs seem to move too quickly, you may want to read that one first.  To recap, the AsBroadcaster class provides a means to create custom events that may be subscribed to and acted upon by listener objects.  The mechanism it uses is relatively straightforward.

Another way to accomplish the same goal, only marginally more complicated, is provided by the EventDispatcher class.  (For what it’s worth, EventDispatcher is the class used by Flash’s v2 UI Components to raise events.  Kind of neat.)  Keep reading »

How to Raise Custom Events (AsBroadcaster)

Wednesday, May 3rd, 2006
ActionScript 2.0

Just the other day, we looked at the difference between event handlers and event listeners.  That article discussed handling events raised by built-in ActionScript classes, such as Button and MovieClipLoader.  So, what if you want to generate your own custom events?  ActionScript certainly supports the practice, and there are two out-of-the-box ways to do it.  But let’s pause for a moment.  Frankly, why would a person even want to raise custom events?  Keep reading »