Monthly Archive for September, 2007

Never Stop Dancing

Cyanide and Happiness, a daily webcomic
Cyanide & Happiness @ Explosm.net

Flex RDF Reader

Over the weekend, I built a simple RDF reader to demonstrate some of the capabilities of Flex 2 for a presentation. I wanted to review what it takes, and post my code for others to enjoy.

I am using a RDF feed provided by the Adobe development center. I choose this feed simply because Adobe has an open cross domain policy, which allows Flex to ingest the feed without any need for a proxy. Learn more about the cross domain policy and it’s security implication here. There is also a site, here, that tracks some of the leading sites that support open cross domain policies – I.E. sites that appreciate Flex & Flash developers :)

First, we want to setup several variables. Four of the five will receive their data from the feed itself.

Continue reading ‘Flex RDF Reader’

AIR Auto Updater Class

Check out the custom Actionscript 3 class: AIR Remote Updater by Claus Wahlers for auto updating your AIR applications. The extra nice piece, you don’t need to maintain an extra version file. Claus’ class uses FZip to download only the application.xml file from your .air package on the server. One little bug I have found, this class throws a File I/O error when you run the AIR application in ADL (debugger). I have simply commented the call to the update() function during development.

Flex Custom Chrome

I have been working for quite some time on a new AIR application. Now that I have the basic functionality working, I want to improve the display. My first task was getting the main application window to become larger after a button is clicked. I achieved this by setting stage.stageHeight=numberValue;

The next task was getting rid of the standard window chrome in favor of an integrated window chrome. First, I changed a value in the main-app.xml file. You need to adjust two attributes on the rootContent tag from this:

<rootcontent systemchrome="standard" transparent="false" visible="true">[SWF reference is generated]</rootcontent>

To
<rootcontent systemchrome="none" transparent="true" visible="true">[SWF reference is generated]</rootcontent>

Now, Flex displays it’s own custom chrome, which looks sort of bad and definitely isn’t what I wanted in the end. I read several tutorials that suggested changing the WindowedApplication tag to Application.

Doing so, however, disables the stage.stageHeight resize that I had set initially. I discovered the answer I was seeking in a post by Leif Wells here. The trick is simply to set an attribute on the WindowedApplication tag to false. Specifically, the showFlexChrome attribute – like so: showFlexChrome="false"

Now, my stage.stageHeight still works, and I don’t have any chrome at all. I still need to setup a close button and the ability to move and resize the window via the mouse, but I don’t anticipate any issues with those items.

Rounded Corners in Flex

Having a hard time getting rounded corners to work in your Flex / AIR application? So was I, until I stumbled across this post by Peter Braid. Apparently, it’s simply a matter of setting the containers borderStyle to solid. You can set the borderThickness to zero if you don’t require a border in the application design. Check out the simple, yet effective, demonstration application Peter built to see an example.

Adobe Max 2007

Headed to Chicago on September 30th to attend the Adobe Max conference. I am very excited! I’ve packed my schedule with sessions on AIR and Flex.

The conference runs October 1st – 3rd. It’s the first Adobe conference I have attended, and I it hope will be an awesome experience. The tickets and hotel were a little pricey, but my company is happily going to foot the bill. Without them, I don’t think I could muster the $2,000 for travel and board – not including the $1,495 for event tickets. Regardless, I’m off to Chicago in  scant 9 days and couldn’t be more gleeful.

If you’re going – I’ll see you there :)

Free Music

Yeah, that’s right – free music. Free Indie music to be specific. Check out http://www.freeindie.com/ a music blog with tons of fun new bands. Finally, now I have even less reasons to dig around on MySpace.  A friend pointed out Matt & Kim, very fun stuff.

Death of Gmail?

Well not yet, but I found that headline so catchy, I couldn’t resist. :)

This post is just a pointer over to Joel on Software’s recent post titled Strategy Letter VI. In his post, Joel explores the death of Lotus and rise of Wordperfect and what this historical reference might mean for AJAX web applications – using Gmail as an example. You’ll have to get past the first few graphs about the rise of Lotus to see the relevance, but it’s worth the read, but then again, there aren’t too many posts on that blog that aren’t worth your time.

I’m not sure Joel is aware of the Google Desktop SDK Google Web Toolkit. I’m certainly no authority on Google’s products, but I believe their SDK is Java-based and compiles down to HTML & JavaScript – something that Joel hints at as a solution for AJAX development in his post. When I played with the Google SDK, everything I built looked so much like Gmail, I couldn’t see how Google developers wouldn’t have used their own SDK to write the Gmail application.

P.S. read more about why writers & bloggers love catchy headlines and why it’s terrible for SEO in my That monster called SEO post.

Deeplinking in Flash (AS2) using Apache & CGI Script

The main drawback to Flash, besides it’s SEO implications, is it’s front door nature. This front-door nature is great if you are using Flash for a traditional animation. However, if you are building an application where users may not always need (or want) to enter via the front door then you want to allow a user to jump to the content they desire.

When I first started looking into Flash deeplinking about two years ago, I was unable to find many references – or even interest – in the subject. Any materials I was able to dig up in Google then, suggested making several SWFs, or a single SWF and placing it in multiple locations in your site to fake deeplinking. All of them used complex query strings to pass variables into Flash. I not only found these solutions messy, but also sort of lame. No offense to those who have attempted any of these methods, I just wanted something a little more intriguing to build, and practical from an engineering and maintenance point of view.

Recently, Google turned up this site on deeplinking, which is certainly much further along than a few years back, but still not exactly what I wanted to create.

My solution, which is obvious for all the Java and Apache fans out there, is turning my single SWF into a smart-application with deeplinking capabilities built right in. Finally, after a few hours of playing, I was able to figure out what it would take to create a clean URL – free from query strings – that allowed deeplinking into a single SWF.

I built the Scribble Board page, which doesn’t employ Flash, but is able to turn the URL into a variable that can then be passed into any application. In the case of Scribble board, it’s passed into a JavaScript function. The Scribble board lives at http://www.developnyc.com/scribble/. Everything that is in the URL after ‘/scribble’ gets sent to the page. You could build a message, like Deeplinking is the goal With a nice, clean URL:

http://www.developnyc.com/scribble/deeplinking/is/the/goal

Continue reading ‘Deeplinking in Flash (AS2) using Apache & CGI Script’

Private Posts Go Public with Save Button?

Ouch! I just learned my first painful Wordpress lesson. If you mark a post private, and then continue to edit it and make revisions, when you hit ’save’ it will move the Post Status from Private to Published.

I didn’t at all expect this to happen, here I was joyfully working on my first tutorial. I took a break from typing to eat a Turkey sandwich. The next thing I know, my unfinished tutorial is live in my Feedburner feed. This was very shocking to say the least. I’ve managed to pull it back, but it wasn’t something I expected. I was hoping I could find something in the Wordpress documents about this, but didn’t find anything here.

Anyway, Se la vie, I learned my lesson (the hard way). Keep posts in draft mode until your ready for the world to see. Forget about that ‘private’ mode if you intend to make any changes. For all of those poor soles exposed to my rough draft, I sincerely apologize. I’ll be posting my Deeplinking in Flash tutorial soon.