Dan Savage on Stephen Colbert re: Prop 8

November 12th, 2008

Dan Savage made an appearance on the Colbert report last night to address the passage of Prop 8.

Dan made some very controversial remarks recently about the role of the black vote in passing prop 8, which Colbert sort of called him on the carpet for (in a funny, kind way).

I fell asleep before Dan came on the air but thanks to the internets, you (and I) can catch it here.

Adventures in Flash Development

November 12th, 2008

My current project at work involves customizing the MeasureMap Flash Date Slider widget for use with our application.

Not being a Flash developer, I’ve run into some basic issues that took a while to sort out. As is my habit, I’m documenting these here so that a) I won’t have to remember them, and b) someone might find them useful. Here goes!

1. If you need to compile a project that includes .fla files, even if you don’t need to edit those files, you can’t use the (free) Flex SDK. You have to use Flash, or venture off into open source world.

2. The Flash IDE is now bundled the Adobe Creative Suite. If you have a graphic/web designer in your company, there’s a really good chance they have a copy of Flash you can install.

3. Actionscript debugging is typically done using “trace()” statements. To view these you need to install a special “debug” version of the Flash Player (uninstall the non-debug version first). The trace statements are written to a file called “flashlog.txt” on your Desktop. More details here.

4. Applying CSS stylesheets to TextFields is not well-documented. Most of the examples you’ll find on the ‘net load the stylesheet file repeatedly; this is completely unnecessary. All you need to do is this:

var styles = new TextField.StyleSheet(); // make this _global if you want
var sheet = "mysheet.css";
styles.onLoad = function(success:Boolean):Void {
if (success) {
trace("Loaded " + sheet);
} else {
trace("Error loading " + sheet);
}
};
styles.load(sheet);

Then to set the text content:

myTextField.styleSheet=styles; // always do this first!
myTextField.htmlText=html;

Another “gotcha” that cost me a day of work: make sure there are no embedded fonts in your TextField. In the Flash IDE, click the “embed…” button and remove all embedding. In my experience, the combo of embedded fonts + StyleSheets makes Flash’s head explode, and causes your Flash TextFields to disappear.

That’s all for now… I’ll update this post later as I continue to wade ever deeper into the Flash swamp.