Viewing by month: January 2008

Jan 28 2008

Flex Skinning: Too easy with CS3 and FB3!

From about 2001 to 2003, I spent a good deal of my time writing ColdFusion applications that backed Flash movies, first with loadVars() and then the blessing of Flash remoting. Flash is really the only "design" package I've ever felt comfortable with, and since I stopped working with it, I've really lost touch with skinning or designing just about anything.

Until now.

With Flex Builder 3 (Beta 3) and Flash CS3 (or just about any CS3 design product), I can skin my Flex apps pixel-perfectly with almost no sweat.

If you've got FB3 and Flash CS3 installed, here's a quick tutorial (works almost the same for Photoshop or Fireworks, too!):

  1. Install extensions.

    The Flex Skin Design Extensions for Flash CS3 are available on the Adobe Labs site. They install like any other extension pack.

  2. Open template.

    Start Flash and create a new project based on any template from the Flex Skins category. Let's use a button for our example:

  3. Redraw the Button to your liking.

    Seriously. World's your oyster (with some limits). Redraw that thing and do a basic Save / Publish to create a .SWC.

  4. Import into Flex

    Open up your Flex project, right click it, and do Import -> Flex -> Skin Artwork:

    Choose the .SWC you just exported from Flash. Select (if necessary - for this simply example, it isn't!) which parts of the skin to import and click Finish:

    It'll ask you if you want to to generate and include the necessary CSS automatically - say yes as you can just clean up the new .css file later:

You're done. Seriously. It'll 9-slice nicely (did you see the dashed guides in Flash), import your new css, and compile your new skin right into you application.

How slick is that? I think I'm going to move beyond my basic "white" CSS file that I use in all my Flex projects!

1 comments - Posted by Joe Rinehart at 9:03 AM - Categories: Flex

Jan 25 2008

Flex Configuration Demystified: services-config.xml, Destinations, and Channels

For a long time, my IM status really was "LCDS configuration sucks," and I meant it. I found its XML files very intimidating, and I deal with XML-based frameworks on a daily basis! Over the past week, I've come to realize it's not that bad. More than anything else, it was the documentation that got me a bit backwards. I don't know if it has to do with its style or my method of comprehension. It seems to immediately dive in to minute configuration detail without ever giving a high-level overview of what all the stuff it talks about actually is.

Read more...

7 comments - Posted by Joe Rinehart at 8:49 AM - Categories: Flex

Jan 23 2008

Adobe Community Experts += Me

Yesterday afternoon I received the official word that I'm now a member of the Adobe Community Experts. I'm excited to be in this network, as it gives me a new pool of resources from which to draw upon for continued community support.

Thanks Adobe (and to Adam Lehman for helping me "apply" at the 11th hour)!

7 comments - Posted by Joe Rinehart at 11:28 AM - Categories: Firemoss

Jan 22 2008

A J2EE Flex dev environment a ColdFusion guy can use!

I've done a little bit of Flex work with Java RemoteObjects. I enjoyed the code side of it, which is where I was helping out, but the server deployment seemed very confusing and the development environment I encountered was painful, involving compiling a Java web app, deploying, compiling Flex app, running, debugging Java app via its logging, wash, rinse, and repeat.

Read more...

3 comments - Posted by Joe Rinehart at 8:35 AM - Categories: Joe Drinks Java | Flex

Jan 17 2008

30-Second Flex 3.0 Localization MUST-READ.

I apologize for the all caps.

I'm doing some internationalization work in Flex 3, and I wanted to save you the headache I just encountered.

If you define a .properties file where you have strings using localized characters (e.g., "EspaƱol"), you may wind up seeing those strings show up in Flex without their special characters, looking something like "Espa?ol."

Making a long story short, if you've got Flex Builder installed, make sure the file encoding (Preferences -> Content Types -> "Default encoding:") is set to UTF-8 as Flex expects! I've got Java development tools installed, so I had to modify the encoding of the Text -> Java Properties File type. It was ISO-something. Changing it to UTF-8 = all happy!

3 comments - Posted by Joe Rinehart at 4:04 PM - Categories: Flex

Jan 16 2008

Flex 3.0 ResourceManager's Change event not working? Here's a fix.

I'm working with localizing a Flex application, and I'm interested in watching the ResourceManager for changes to the current localeChain.

According to the docs, I need to register an event listener for CloseEvent.CLOSE, which doesn't seem at all correct. When I tested it, it didn't work at all.

One great thing about the Flex framework is that it's cake to open up the framework's source code and see what it's up to.

Looking in ResourceManager, it's got nothing to do with CloseEvent (which makes sense).

In the setter for the localeChain property, the "update()" method is called.

Update lists this:

public function update():void
{
dispatchEvent(new Event(Event.CHANGE));
}

Well that about fixes it. Instead of listening for CloseEvent.CLOSE, listen for Event.CHANGE.

1 comments - Posted by Joe Rinehart at 2:51 PM - Categories: Flex

Jan 16 2008

Model-Glue 3 at CFManiacs!

I'm pleased to announce that this May I'll be at CFManiacs to talk about Model-Glue 3. CFManaics is part of the WebManaics series of conferences from FigLeaf Software.

My schedule's gotten a bit full, so I won't be attending the full conference. I'll likely be flying in the morning I speak then heading straight back to the airport afterwords.

1 comments - Posted by Joe Rinehart at 10:06 AM - Categories: Conferences and Speaking Engagements