Quantcast Labs | The Danosphere.

The Danosphere.

Avatar

class TheDanosphere extends Dan implements Blog

Build iPhone iOS Apps Using Flex Hero and Flash Builder Burrito

**Editor’s Note: I have a jailbroken iPhone, which makes installing custom IPA files incredibly easy in comparison to those of you still imprisoned by Apple. If you have a legitimate Apple Dev Cert. you should be able to just drag and drop your IPA into iTunes and sync- but I am free of Apple’s chains, so I haven’t tested this and can’t promise you anything.

If you are jailbroken, you have nothing to fear and are ready to rock and roll. For information on jailbreaking iOS 4.2 to make your life easier and your iOS awesomer click here**

Everyone is excited about Adobe’s new Flex Hero SDK, the first Flex SDK to truly enable mobile application development using the Flex framework. And then you read that it only allows you to build native applications for android, and you grimace, and move on. At least that’s what Adobe tells you. I’m here to tell you that with a little know-how, and some command-line fu, you can indeed built Flex mobile applications for the iPhone- right now.

First you’ll need to equip yourself. To complete this you need to download the Flex Hero 4.5 SDK, Flash Builder Burrito, and the Adobe Packager for iPhone.

Download: Flash Builder Burrito Preview Release [includes Flex Hero SDK bundled]

Download: Adobe Package for iPhone Preview 2

This walkthrough is going to be extremely basic. I’ll show you how to get a simple Flex Mobile app onto your iphone, and then it’s up to you to build on these concepts.

Open up Flash Builder Burrito and create a new mobile project, add a simple button to the main application just so you can know that everything is working. Save and exit. Now fire up a command line/terminal. What you need to do now is use the Flex mxmlc command line compiler to create a swf file from you MXML application which is compatible with the Packager for iPhone- Flash Builder Burrito will not do this by default because it uses the AIR2.5 namespace, that’s why you need to use the command line. After you generate a SWF file, you will use the Package for iPhone to create a .IPA file that you can drop onto your phone. Presto changeo- Flex Mobile application on iPhone!

There are a few catches to all of this, so keep reading. To generate IPA iphone application files using Packager for iPhone you need 2 things- an XML application descriptor file, and an Apple Developer Security Certificate.

The first part is easy, create a file – I called mine dl3_mobile-app.xml. This file tells the packager for iPhone a few things, namely stuff about icons, splash screens, and the like. Here is my application descriptor file for reference:

asdf
asp
fds
';document.write(content);
[code snippet: http://snipt.org/wnxh]

The second problem is the whole Apple Developer certificate issue. The problem is, those cost money- and most likely you just want to see your Flex App running on an iPhone, so why would you spend $100 to see that? Amirite? Right. So check out this nifty walkthrough on how to get a Fake Apple Developer cert so you can keep moving forward with this whole shibang – you may need to create an account to download the necessary files, but it’s free and they won’t spam ya:

How to use Adobe’s iPhone Packager without an Apple Developer Subscription

Ok now we’re set. So now we just need to compile the swf from the command line, and then package it up for iPhone. Here are the 2 commands respectively to accomplish all that:

asdf
asp
fds
';document.write(content);
[code snippet: http://snipt.org/wnxi]

After the first command is run you should have a SWF file, and after the second one is run [it will take a few minutes to complete, be patient!] you should have an IPA file – this is a native iPhone application! Boomshakalaka!

All done! Now you just need to copy the IPA file to your iPhone and install it! I’ll leave that part to you to figure out, but it’s really easy- just Google it.

That’s it! Shout out to the EverythingFlex Blog for helping me figure this all out.

Remember you technically shouldn’t be able to do this [Flex on iPhone] so don’t be shocked when performance is… subpar. For more helpful links on getting the jump on developing for mobile using Flex Hero, and compiling for iPhone using the Packager for iPhone, checkout these links:

asdf
asp
fds
';document.write(content);
[code snippet: http://snipt.org/wnxk]

Also checkout more of my SniptBox on Snipt.org.

Snipt.org – Share code snippets and large text via twitter!

Snipt.org is a nifty little tool for developers / everyone. It’s like twitpic but for code and long text. Punch in some code or a long paragraph, select the language type (“text” for long text), and then snip it! Snipt will give you a short URL to share your content with people via twitter.

Here’s my little snipt for you: http://snipt.org/63

AS3 Node Network

I have been doing some pretty cool “node” based UI stuff at work using FLEX. I wanted to try and push the idea further, but the code I wrote at work is proprietary. Thus, I’ve decided to start from scratch! Since I’m starting from scratch I decided to do it up in Flash, here is the base for it, I’ll post updates as it advances.

Use: Click to create a node. Click and drag nodes to move them around.

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

IDA Final: Funny Father’s Day Short

I’ve been smothered in the horror that is week 10 and finals week here at RIT. I’m just about through it with lots more to post about, but in the meantime I’ll keep this one short. This is my Intro to Digital Animation final project, as usual it was a bit rushed because I’m taking 20 credit hours and I’ve got final projects in all my classes but here it is.

You need to a flashplayer enabled browser to view this YouTube video

The assignment was a humorous father’s day short about an experience we’ve had with our dad. This is actually based on a true story so I thought it would work well. I was going for a “South Park” feel, and came up a bit short on sound but that’s always a bitch.

Some Design Work for a Friend…

shea_poster_sm.jpg

Here is a quick poster layout / background I did for my buddy’s senior project poster (printed at 40″x32″). He just wanted a background he could add his text and images into. I whipped it up pretty quick, can you say Microelectronic Engineering meets Web 2.0?

AS3 FileReference Example

AS3 FileReference Pic

A while ago I made a post about FileReference in AS2. For a recent project I needed to create a simple uploader class which uploads files to a given server from flash, so once again I was face to face with FileReference, but this time in AS3. The syntax is almost identical, with a few small nuances. Ill let you download the source** to get the full details.

This example has some a few small frills, my favorite of which is the constructor takes a directory name where you would like the file to be uploaded (relative to the upload script), this allows me to reuse this class for many different uploads, to different directories.

** Note: For this to work you need to put “upload.php” on your server and point the variable ‘phpUploadScript’ in FileUploader.as on line 20 to upload.php.

| next

What's Here?