Corner Radius Doesn’t work on HBox/VBox

I haven’t been responsible for the skinning on most of our Flex projects but today that’s exactly what I’ve been doing all day. I just discovered that setting the cornerRadius style of a HBox or VBox has no effect when used on it’s own in css or MXML. The style ‘borderStyle’ also needs to be set to ‘solid’ for the cornerRadius you’ve set to display! Weird…

Flex CSS to SWF skinning – why the middleman?

When I first decided to move over to Flex Development version 2 had just launched. I glanced through the feature list initially as I was trying to decide which tool to build for a cool new project that leant itself well to Flex. The project was for a Printing Company who wanted to enable users to design their own business cards, stationary etc and output to a 300 dpi pdf, oh and be able to save their files and re-edit of course! A really nice project.

The application would enable the in-house designers at the print company to create design templates too which the users could use as starting blocks.

One of the reasons I chose Flex for the development on this project was because I thought it was able to load fonts and css at runtime to make re-skinning an application quick and simple.  This turned out not to be the case. You had to (and unfortunately still do with Flex 4) go through a middleman process of using one of the built in Flex tools to convert your css file into a style swf that was then compatible with Flex apps and could be loaded in at runtime. I really don’t know why this middle stage is required. Yes, I know that it enables you to embed swf symbols, graphics, sounds and even fonts into the style swf but isn’t the Flash Player capable of loading all these file types in at runtime (not sure about fonts – ie TTF files)? So why can’t the StyleManager class load in the css file directly at runtime, process it working out any required media files and load them in too before dispatching the style changed event? If it had been done this way then I actually think Designers could be introduced to writing Flex css files directly – they’d be able to edit the style css and keep refreshing the Flex application swf without ever having to recompile anything. To me that would be a great improvement on the Flex Design and Development workflow.

I did go to Mark Anders presentation at FOTB where he demoed the new software tool Thermo which is aimed specifically at Flex Skin Designers – certainly a cool edition and it’s nice to see that Adobe have reallised that Flex skinning needs improvement but we still got the middleman – not a style swf anymore, now a new XML style Flex design output with the file extension ‘fxg’. Anyway, I think I’ll blog about that in a separate post…

Flex Builder 3 Development + Flash Player 10 Beta = Grief

I installed Flash Player 10 Beta the other day which unfortunately led to about 1 hours wasted Flex Development time this morning when I started work this morning. I tried run a Flex application I’ve been working on in debug mode. Last time I ran it on Friday it worked fine but this time I got an Eclipse alert the moment I tried to run the debug with the following message:

/Library/Internet Plug-Ins/Flash Player.plugin

Flex Builder cannot locate the required debugger version of Flash Player. You might need to install the debugger version of Flash Player 9 or reinstall Flex Builder.

Do you want to try to debug with the current version?

Click yes and the app runs but no debug traces back in Flex Builder.

The problem turned out to be that when I installed Flash 10 Beta Player it overwrote my default Flash 9 Debug Player. I found a reference to this bug in the Adobe Bugs DB. Looks like as OS X specific bug.

Anyway, the solution is to uninstall Flash Player and then reinstall Flash 9 Debug version which isn’t ideal as I’d like to keep Flash 10 Beta running.

If anyones knows how to run the 2 simultaneously please let me know 🙂