Flex - Template System Using Regular Expressions & Simple OOP

I think it goes without saying that we all want to be regular expression hipsters like Ben Nadel ... maybe it's just me? Anyway, there have been many occasions when a regular expression would have been the best tool for the job, but I wimped out and went with more cumbersome string manipulations with code. For a recent messaging system using templates, I started down that road but, luckily found a compelling reason to force myself to use the ActionScript RegEx class.

So the quick skinny is that I have a template with placeholders that I need to substitute completely before moving on. For the purposes of discussion, the reasons for the system will be unexplored and I'll try to leave everything simple enough to allow easy re-purposing.

The placeholder for the substitution needs to be fairly unique so that we don't collide with something that ought to be displayed. In this case, we'll denote all of the substitution values with the following form:


Actionscript Apps for Android

Since I have recently hopped onto the Android bandwagon, I've been perusing the market. After installing the working Tricorder everything does some weak by comparison, but I did press on.

Surprisingly, I found two ActionScript related apps for Android lately:

  • ActionScript Reference for Android
  • Flubble

ActionScript Reference for Android

This ought to be rather self-explanatory. Jonathan Dunlap has whipped together a little android app that offers the AS3 helpdocs. Nothing earth shattering, but a nice way to spelunk the docs. I'm thinking that it'll be my go-to app when I have to kill some time.


I haven't quite figured out what to make of Flubble yet. Ostensibly, it is a stubbing app for ActionScript classes. I haven't used this for an actual project yet, but I have run some tests and received my class files both as AS3 and XML. The XML is an interesting option that threatens to have some potential, though I haven't worked out quite how I would use it. It looks to be a nifty little app and I hope that I can fit it into the workflow in some way.

Of course, there are a lot of generic supporting apps to be found (text editors, ftp clients, ftp server (odd), flash card makers and the like), but for some reason I was surprised to find an app like Flubble. It does get the wheels turning about what sort of apps could be created for the platform.

Flex Builder Coldfusion wizard visual query builder not working solution

This has been haunting me this entire week, particularly since I found the solution more than once but chose to forget it. Thankfully we started this blog to help us provide the answer for the things we forget.

So, if the visual query builder does not show up when you try to edit a master page or edit detail page while using the Coldfusion Flex or Ajax application wizard, HERE IS THE SOLUTION:

Start Flex Builder as an ADMINISTATOR! (Windows Vista or 7)

I hope I will remember the next time...

To reiterate, starting flex builder 3 as an administrator fixes the issue where the Visual query builder does not seem to work while trying to edit master page.

Flex - Rounded Corner Component with Tiled Bitmap Background

Lately, I have been getting more involved into working with the visual aspect of Flex. Up to now, I had been able to pass off the styling to Alex after working on the functionality or have just worked on projects where the visuals weren't a concern. Anyway, it is often good to get opportunities to explore.

So, the simple thing that I needed to do was to create a rectangular component based on mx:Canvas with a tiling background and rounded corners. Figuring this ought to be a straightforward thing to do, I blithely set about it.

First snag: Flex doesn't seem to offer a straightforward way of identifying a repeatable background for the Canvas class. Quick searching revealed that one can do this with Degrafa, but I didn't want to go that route. (Not that Degrafa isn't tremendous, it just seems like a lot of overhead just to tile a background image.) There is another solution for setting a tiled image as a background.

That is a really nice solution, but, for my immediate purposes, has distracting elements like loading the image at run-time. Run-time loading could be an incredibly useful feature, and it is worth noting, but if you have a small, single image you want to use, it is nicer to just embed it and not have dependencies at deployment. The core of the solution is to use lower level AS3 functions to draw a rectangled that is filled with the bitmap of choice.

So, a quick bit of code that shows the embedded image written as a tiled background for the component:


Flash & Flex Developer Magazine Is Free With Community Resources

For those that may not be aware, Flash & Flex Developer Magazine has moved to a free, online distribution model. This is a plus because they used to be quite expensive. I'm not the biggest fan of their site layout, it used to be torturous to navigate it, but they seem to be improving it.

And, as a bonus, they have a flash and flex community section that allows you to add your own blog, along with whatever description you care to give yourself (here is the ShortFusion blog profile). They also have areas to promote usergroups and events.


Question about Flash Cross-Compile to iPhone

I mentioned in my last post that an iPhone developer attended a Flex presentation that I gave. He was hoping to get some info on how he might use Flash as a means of producing apps instead of Objective C. Not sure what development environments exist for iPhone development presently, but the idea of using Flash is obviously titillating to some.


Flex Presentation in Tampa - Thanks To Those That Attended

I gave my first real presentation last night, Flex Time1. About 10 people showed up and only one left in the middle. To be fair, he did say something about having to "meet a stripper in 10 minutes" (that's what I heard), so how can you compete with that? Otherwise, it was a good crowd of varying backgrounds with thoughtful questions. We even had an iPhone developer show up hoping to get insight into how to use Flash in place of Object C development, so Adobe's iPhone announcement is reverberating beyond just its core fans.


Is the Tampa Bay Coldfusion User Group dead?

The tbfusion.org site is now a Network Solutions ad page (no link because it is now just an ad site). This is somewhat sad as there were about 10 people at the last meeting some months ago and it seemed like a renewed interest in revitalizing the group. Worse, our local Adobe Enterprise evangilist Greg Wilson had offered to help with the group and to coordinate with another potentially dead group, the Tampa Flash, Flex and AIR Developers group.

In the case of the Tampa Flash, Flex and AIR Developers Group (I would have called it the Tampa Actionscript MXML Plus Ajax (TAMPA) group, but rarely is my genius acronym ability consulted), I'm pretty sure that the folks at HD Interactive are busy. The presentation that they gave at barcampa Tampa 2009 showed that they are working with some really cool augmented reality projects so I can forgive them for being a little distracted. That said, when they have meetings, more than 50 people show up. From what I know of user group participation, that's frickin' tremendous.

Anyway, with the Tampa Bay CF group seemingly DOA, and the TFFA somewhat MIA, I guess I'll just have to be happy that the Central Florida Web Developers User Group is still meeting reguarly, even if they are set to endure my neophyte introductory Flex presentation next week (Tuesday, October 13 @ 6).

Inaccessible Flex Button Icon Properties and Using Image Filters With Event Handlers

Discovered today an annoying thing: it doesn't seem possible to directly manipulate the icon of a button. I had grabbed some freely available icons as representative pieces for a project prototype, but in piecing together the mismatched set I wound up with varied sizes. The problem is that when the icon property of a button is set to the class of the respective embedded png, the image is put in at an unconstrained size. This creates a really unattractive inconsistent look. Sure, I could open up a handy image editor and re-size the images, but this is a prototype and I really couldn't justify spending a lot of time doing image manipulation.


Flex Intro Presentation in Tampa Bay - October 13

I should have made a post earlier since I am going to be competing with the tremendous reports coming out of MAX (and there were some pretty nifty announcements in today's keynote), but, here goes anyway. For the Central Florida Web Developers User Group (Tampa Bay, FL area), I'll be giving an intro to Flex that focuses on the practical things one can immediately do with a minimum of experience; sort of like a Flex Discovery Flight that encourages you to take the controls.

The group is largely comprised of CF developers (so expect some chatter on CF9), seemingly all of whom have not yet taken the plunge into the wonderful world of Flex. While it is a mostly ColdFusion audience, I will also cover easy techniques to communicate with any server side technology.

Also, since I am a big believer in meeting-oriented giveaways, I have cajoled my employer, imageMEDIA, into printing full size Flex 3 and Actionscript 3 posters. Haven't worked out if it will be a single giveaway, but somebody not me will be going home with them.

So, if you'll be in Tampa on Tuesday, October 13 2009 and want an intro to Flex, and a chance to get some handy Flex posters, sign up for my Flex talk that our meetup organizer, Aaron, has named Flex Time.

More Entries

BlogCFC was created by Raymond Camden. This blog is running version Contact Blog Owner