Archive for October, 2008

Flex CSS to SWF skinning – why the middleman?

04.10.2008 0

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

03.10.2008 2

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 :-)

Blown Away3D

02.10.2008 0

I’ve been staying with a friend (and all round programming Guru) Jethro during my visit to FOTB. He also makes heavy use of Flex in his work and although he was unable to attend yesterday’s presentations he asked if I’d check out the Away 3D talk by Rob Bateman. Jetho has been complaining away over the last few days to me (which isn’t uncommon!) about the instability of the PaperVision3D code-base. He’s using it in a current project and apparently after periodic SVN updates he’s been finding that significant, undocumented changes to the API are not uncommon which of course have knock-on effects on many developer’s projects. Apparently the way the camera focal projection works was changed recently plus a dirty implementation of 3D animation imports led to numerous AS3 errors generated in projects. A few of the examples he’s been complaining about!

Read more