XCode Flex Application Template

19 04 2007

Following up on my previous post, I’ve been really getting into developing Flex applications lately and thought I’d share my basic Flex Application template I’ve created for Apple’s XCode. The template is based on Josh Buhler’s template but adds a few features that I find pretty handy. Those features include:

  • Controller.as
    Bare-bones AS3 class to act as the main application’s controller.
  • AS3 Class file template
    Simple file template to create AS3 classes
  • Build-and-Run in Safari
    Compiles the flex app and opens it in Safari
  • HTML template
    Simple html template to display swf, includes SWFObject javascript
  • flex_skins.css
    Default css file

Installation is pretty simple. For the Flex Application project, Just copy the “Flash” folder into /Library/Application Support/Apple/Developer Tools/Project Templates/

For the AS3 class file template, copy the “Flash” folder in the “file template” folder into the following location:
/Library/Application Support/Apple/Developer Tools/File Templates/

For code-hinting and auto-complete, download and install these language configurations.

The template assumes you’ve installed the Flex 2 SDK into /Developer/SDKs/Flex/. Follow the directions on Josh Buhler’s page for more details.
Below is a screen-shot of an example application based on the template in XCode.

Flex XCode Template

You can download the template from this location. If you run into troubles don’t be afraid to ask questions using the comments for this post. Cheers, and happy FleXCoding!

Advertisements




Creating AS3 applications using XCode and mxmlc

8 04 2007

Yesterday I decided I’d spend my weekend trying to get my feet wet using Actionscript 3. Little did I know that it would be such an endeavor to get up and running.

First, I wanted to see what I could do using Apple’s XCode. I really like the XCode editor and environment and have used it to develop AS2 stuff in the past, so I figured someone had probably already built some templates for AS3 development. No such luck. I did find a rough starting point at Josh Buhler’s blog. Since I didn’t really want to play with Flex, but rather AS3, I started modifying his template to suit my purposes. I also wanted to take advantage of these language specs.

What I came up with is a custom xcode project template that starts me off with a default AS3 class and a simply directory structure. From there I modified the “build and run” command to open my published html/swf in Safari.

If anyone is interested in the template, drop me a comment or email and I’ll send it over. I’ll try to explain how to use it in another post if there is any interest.

Now.. on to experimenting with AS3!