Sending Dexter to the iPhone.

January 31, 2011 § Leave a comment

Well, where should I start with this one? Hmmm? I’ve had a love and hate relationship with this assignment. I can’t believe how excited I was to see myself learn how to convert and transfer our flash project to the iPhone, but at the same time I found myself so frustrated. Initially, I couldn’t even get a simple flash file to transfer over to the iPhone, even after following all the steps correctly, anyway, more on that later. Lets start at the beginning…

Dan went through with the steps of creating a certificate in class. We were then able to download the certificate from the IOS DEV center at the Apple’s Developer website.  Provisioning files were also downloaded from the website, which are used for testing on specified devices. Devices were then added on as well, in the Devices section. The certificate was then converted to .p12 format file, so that it could be used for publishing.

I decided to upload my “Save Dexter” (Tilt project) to the iPhone. I just felt that it would be a great idea to try out my game and actually use the iPhone to tilt rather then the penguin emulator. I thought it would be a great choice for me to show it off at the Open House. Personally, thought I did a decent job with it. It had decent graphics and the game play looked smooth.

Problems and Troubleshooting

I ran into problems, while publishing even a simple test file. I created a small rectangle in flash and published it as an .ipa format, for the iPhone.  I dragged it to the iTunes and synced it up with the iPhone. I was able to upload it perfectly but when I decided to replace or add another app on to it, I was not able to do that.

I received an error during the syncing process in the iTunes. The error message was something along the lines of…”the application does not have a valid entitlement.” It was quite frustrating because I followed exactly the same steps that I did the first time around but I was not able to get it on there. My classmate, Kim and my Professor, Dan, helped along the way and we went through the process together but were not able to figure it out.

I kept on playing around with the “publish” settings in Flash. I clicked on the “publish” settings under File. The “publish” window popped up, and then I went to the “Flash” tab and changed the “player” to iPhone IOS. Normally, you DON’T have to do this. You could just click on File > iPhone OS Setting and publish it from there, it is the same thing but for some odd reason, it didn’t work for me. Anyway, I kept having the same problem throughout. It would work for me sometime and sometime it wouldn’t.

Eventually, I was able to put Dexter on to the iPhone but my Tilt wasn’t working because I used the Penguin Emulator for the project before. I imported the Accelerometer class and created a new Accelerometer object. Some how I was just not able to figure it out.

HERE IS PARTS OF THE CODE THAT I USED.

Accelerometer class.

import flash.sensors.Accelerometer;

import flash.events.AccelerometerEvent;

 

In the public class…

private var myAcc:Accelerometer = new Accelerometer();

Added the EventListener in the constructor code…

myAcc.addEventListener(AccelerometerEvent.UPDATE, doTilt);

 

In the function doTilt() I added…

private function doTilt(e:Event)

{

moveX = e.accelerationX;

moveY = e.accelerationY;

}

Conclusion – I’m quite disappointed with how this assignment went for me. The error of uploading on to the iPhone really set me back and was not able to get it to work perfectly like I usually do for all my projects.  Eventually, I was able to put it up on iPhone but was not able to make the tilt work in time.

 

Here are a few great links that I looked up…

Testing the iPhone packager in Flash CS5

The first one in particular is related to our project. It talks a blogger’s experience using the iPhone packager. He used the Tweener class for the effects. He also talks about his experience with the Accelerometer Class, which is, actually, new in the AS3.

http://labs.makingwaves.com/2010/03/24/testing-the-iphone-packager-in-flash-cs5/

Developing games using Adobe Packager for iPhone

Here is another great blog about game development for iPhones. The blogger talks about his experience and specifically, talks about the multi-touch code. It is something that I also wanted to use for my project.

http://csharksgames.blogspot.com/2010/11/developing-games-using-adobe-packager.html

 

Packager for iPhone: Render Performance

Here is a great article that talks about the Render performance in the iPhone. It is an in-depth tutorial about the vector vs bitmap performance in the iPhone. Really would ask everyone to go over this tutorial. It would allow people to get the best results on to the iPhone.

http://www.yeahbutisitflash.com/?p=986

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

Here is a step by step process of how to use Adobe’s iPhone Packager without an Apple Developer Subscription. You need a jailbroken iPhone for this though but good and informative steps.

http://www.instructables.com/id/How-to-use-Adobes-iPhone-Packager-without-an-Appl/

 

Where Am I?

You are currently viewing the archives for January, 2011 at my IMM's blog.