
Aloha, Joe

ComboBox Designed with Embedded Font
The ComboBox above was created in Flash CS3, and the text styles were modified using ActionScript 3.0. By extending the ComboBox class, I created a custom DesignComboBox class, then added the CBDesignRenderer class to style the dropdown fields.
The ComboBox component needs to exist in the library before you can create it with AS3. The DesignComboBox class and CBDesignRenderer class are listed below.
You can DM me on Twitter @jazzairtech if you want me to send you the FLA and AS files.
/* DesignComboBox.as */
package com.jazzairtech.ComboBoxDesign
{
import flash.text.TextFormat;
import fl.controls.ComboBox;
import fl.controls.List;
/**
* DesignComboBox class
* Apply embedded font to ComboBox List items
*/
public class DesignComboBox extends ComboBox {
private var cdDesignFmt:TextFormat;
public function DesignComboBox() {
super();
var cbFmt:TextFormat = new TextFormat();
var myArial:Arial = new Arial();
cbFmt.font = myArial.fontName;
cbFmt.size = 20;
textField.setStyle("embedFonts", true);
textField.setStyle("textFormat", cbFmt);
// Apply CBDesignRenderer to set dropdown format
dropdown.setStyle("cellRenderer", CBDesignRenderer);
}
override protected function drawLayout():void {
super.drawLayout();
textField.y = 0;
}
}
}
/* CBDesignRenderer.as */
package com.jazzairtech.ComboBoxDesign
{
import flash.text.TextFormat;
import fl.controls.listClasses.CellRenderer;
/**
* CBDesignRenderer class
* Adds an embedded font (Arial) to ComboBox List items
*/
public class CBDesignRenderer extends CellRenderer {
public function CBDesignRenderer() {
super();
var cbFmt:TextFormat = new TextFormat();
var myArial:Arial = new Arial();
cbFmt.font = myArial.fontName;
cbFmt.size = 16;
this.setStyle("embedFonts", true);
this.setStyle("textFormat", cbFmt);
}
}
}
Styling the ComboBox with AS3 takes a little extra coding, but I think it's worth the effort to improve how it looks.
Aloha, Joe
I just started experimenting with the MapQuest Developer API for Flash CS3 (ActionScript 3). So far it's been an enjoyable project! I worked through some of the samples and experimented with many of the cool MapQuest features that are available in the free developer Flash extensions. I'm having fun making custom points of interest (POIs) on maps, zooming, scrolling, and icons. There are a couple of traps that I ran into when following the AS3 code in the Sample Scripts found in the MapQuest Developer Library.
All was going well until I tried to build the Geocode interface found in the samples. It took a while to realize the right login parameters, but the main bug that bit my example was the server name. The sample script points to a geocode access server, but the correct server is actually the free server! That took a while to troubleshoot.

I uploaded a working version of the Geocode Address interface.
I think I'll tinker with this API for a while and see what waves I can generate across the Pacific!
Aloha, Joe