Archive for the ‘Flex’ Category

Css in Flex

2008-08-29

I had some issues today to change the background color of a button in Flex. The up-skin was set for the Button selector which meant setting the fill-colors property for the Button.special selector had no effect. Setting the up-skin to null was the only solution. This was easy to do in code with setStyle, but I wanted to do it in css. Writing null wasn’t quite enough. Apearently you need to use ClassReference(null). Hope this helps someone out.

Button {
  up-skin: Embed(source='img/example.png');
}
Button.special{
  up-skin: ClassReference(null);
  fill-alphas: 1.0, 1.0;
  fill-colors: #00FF00, #00FF00;
}

AIR afterhours

2008-01-18

I’ve been to a great afterhours session about AIR with Peter Elst. He’s writing a book on the subject so obviously there was lots he had to teach. He covered the windowing, file, dragdrop, sqlite and upgrade apis. This was a bring-your-own-laptop session so all the people present were experimenting with the code. We found a few oddities that you usually learn the hard way.

FileFilter behaves differently on mac and windows. On windows the extension parameter must start with an asterisk "*.html", on mac both "*.html" and ".html" seem to work.

Creating and manipulating NativeWindows works great, but adding flex components to the stage of a new NativeWindow doesn’t seem to work. Daniel Dura had a workaround for this, but that doesn’t seem to work anymore.

He gifted a few books at the end. ActionScript 3.0 Design Patterns is now mine. Thanks Peter!

Update: Peter has remembered how to use mx.core.Window as a a native window.

BlogReader

2006-12-26

I too am toying around with Flex 2. Thus copying every other Flash programmer on this planet. The states, transitions and binding are going to be a blessing for every programmer.

(more…)