游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

针对iOS平台移植Flash内容的指导教程(1)

发布时间:2011-12-07 15:18:16 Tags:,,

作者:Sina Kashanizadeh

本篇指导教程来自Untold Entertainment,主要论述开发者如何通过FlashDevelop在PC平台制作免费AIR应用,然后将其投放至iOS设备(游戏邦注:如苹果iPad、iPhone或iPod Touch),以充当该平台的原生应用。(点击此处查看第二部分第三部分内容

如今依然还有很多守旧之人锁定Flash技术。自从乔布斯公开宣称Flash技术即将消亡,业内就涌现众多关于Flash局限性问题的争论。这些夸大其辞的报道对那些靠开发Flash和Actionscript内容谋生的人而言危害很大。回到2000年,当时我首次接触Flash,我选择它的原因是其可替代性选择是HTML。HTML根据以下因素会表现出完全不同的运行效果:

1. 平台(Mac、PC或Linux)

2. 屏幕分辨率(640×480、800×600和1024×768等)

3. 浏览器(Netscape、Internet Explorer和Safari)

4. 浏览器版本(HTML在IE6和IE7中的呈现方式完全不同)

而通过Flash,我能够在小小的Flash Player方框里创建内容,其内容能够在各种平台、分辨率、浏览器和浏览器版本中表现一致。此外,我们作为拥有视觉能力的人类,还能够在此工具中呈现展示内容,无需进行抽象编码,然后再等待查看浏览器将如何呈现。

业内推崇HTML5的趋势并未令我感到害怕——更准确地说,它让我感到不适。这是种倒退。在缺乏适当工具的情况下,我发现自己只能抓狂地在codespace中描绘所有内容,针对各种异常情况编程,这样我的内容才能够在各种平台、浏览器和版本上适当运行。

运用Flash

只要其他技术的工具依然惹人厌,只要我还能够通过Flash制作内容和创收,我就会继续坚持当前路线,直到出现某个富有说服力的技术/创意/工作流程从而促使我进行转变。以下就是几种让我坚持该选择的理由:

1. 没有人希望体验基于浏览器的手机游戏。原生应用才是王道。

2. 你可以以原始应用的形式将Flash和Actionscript内容投放至iPhone。

3. 你无需购买Flash Professional或Creative Suite便能制作内容。

4. 除了最后一个步骤(将内容投放至App Store),你的其他开发步骤都可以在PC平台实现。

所需材料

虽然你并不一定要付费购买Adobe工具,但建议你最好花点钱为妙。下面是若干你需要的东西:

Mac(from gamasutra)

Mac(from gamasutra)

1. 苹果开发者帐户,年费99美元。只要你起初就确定走此路线,未来就需长久如此,若你让自己的帐户失效,他们就会将你的所有商品移除商店。

2. 运行最新版Xcode(免费)的Mac电脑(非免费)。

3. 一部iOS设备(可选项,但强烈建议选择该设备)。

4. 第4版或更高等级的FlashDevelop(免费,只限PC)

Flash内容植入iOS?

将Flash应用移植至iOS的方式很多,我所谈到的问题只是针对我个人的方式。而我所谈到的过程主要针对PC平台。

入门指南

开始前,我想推荐Adobe Evangelist李·布赖姆洛制作的优秀视频,此视频分享将Flash应用投放至App Store所需的基本要素,我非常推荐这个视频,因为它详细论述AIR应用以PC格式入驻App Store的复杂过程。

此视频覆盖众多内容,但基本要素可以归结成:你的最终目标是创建.ipa格式的文件,你将把此内容上传至App Store。执行此过程需具备:

* 应用

* 苹果iOS开发者ID

* iPad或iPhone

* Mac(游戏邦注:但只有一个步骤需要,可以向朋友借)

* 认证证书

* Mobile Provisioning Profile

* 激情

注册帐号

就像我之前提到的,你需要获得苹果给予的开发者ID。登陆iOS Dev Center,“免费”进行注册。

iOS Dev Center(from gamasutra)

iOS Dev Center(from gamasutra)

完成所有注册步骤及进行邮箱确认后,你就会得到苹果ID。不幸的是,虽然你可以免费得到苹果ID,但若你想基于其设备制作内容(即便只是测试某款你永远不会发行的应用),也需要每年支付99美元。如果要注册付费帐号,你最好能保证自己的《愤怒的小鸟》克隆作品每年至少可以创收100美元以收回成本。你可以选择注册免费学生帐户,但你还是需要付费方能制作内容。若你帮助某人制作iPhone/iPad应用,而他有支付开发者费用,那么他可以将你添加为项目合伙人。

在开发者帐户中添加设备

若你想要测试及最终发行此应用,你就需要苹果设备,如iPhone、iPod Touch或iPad。你还需要通过自己的ID注册苹果设备。请遵照如下步骤:

1. 进入iOS Developer网站,输入你的新帐户信息。这里你将看到iOS Provisioning Portal,点击查看进一步选择。

 iOS Provisioning Portal(from gamasutra)

iOS Provisioning Portal(from gamasutra)

2. 在工具条中点击设备。

点击工具条(from gamasutra)

点击工具条(from gamasutra)

3. 点击添加设备。注意:若你是合伙开发者,属于团队成员,你就无法添加设备。此选择只为主要帐户所有者享有。

添加设备(from gamasutra)

添加设备(from gamasutra)

4. 在此界面中,你最多可以在帐户中添加100个设备。最开始先添加设备名称,只需输入某些能够帮你辨认设备的信息,如“Sina的iPad”或“我从某家伙那偷来的iPhone”。

5. 输入设备ID(40个十六进制字符)。这是有关即将注册设备的帐号。为找到此设备的ID,请在设备连接时开启iTunes。你将在主屏上看到所有该设备的信息,包括名为Serial Number的字段。它看起来并不像能够进行点击操作,但点击后数字就会变成十六进制编码。这就是你的设备ID。

点击输入字符(from gamasutra)

点击输入字符(from gamasutra)

6. 填充这些信息后,点击提交,设备就会添加至你的Developer帐户,这样你就能够创建Adobe AIR应用,在你的设备上进行测试。

本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

Flash to iOS: A Step-by-Step Tutorial (Part 1)

by Ryan Creighton

[this article is cross-posted from the Untold Entertainment blog, which is awesome]

This is the first part of our tutorial series by Intern Sina on creating an AIR application for free on a PC using FlashDevelop, and deploying it as a native app on an iOS device like the Apple iPad, iPhone or iPod Touch.

Dead Wrong

There’s a lot of FUD floating around about Flash these days. Ever since Steve Jobs took to the mic and sounded the death knell of at least the perception of Flash, there’s been heaping gobs of misinformation about what you can and can’t, should and shouldn’t do with Flash. i chalk it up to the fact that death is news. It’s BIG news when Michael Jackson dies, BIG news when Steve Jobs dies, and equally big news if you can be among the first to report on the death of a technology or company – RIM, Flash, Palm, HP – take your pick. If it bleeds, it leads.

This hyperbolic and sensational misreporting is particularly damaging for those of us who have made our living developing with Flash and Actionscript. Back in 2000, when i first got into Flash, i chose it because the alternative was HTML. HTML appeared and performed completely differently depending on a number of different factors:

1. The platform (Mac, PC or Linux)

2. The screen resolution (640×480, 800×600, 1024×768, etc)

3. The browser (Netscape, Internet Explorer, Safari)

4. The browser version (HTML could render completely differently from IE6 to IE7)

Meanwhile with Flash, i could build something inside the little Flash Player box, and it would look and behave reasonably identically across platforms, resolutions, browsers, and browser versions. (Subsequent versions of the Flash player complicated things a smidge, but we were still WORLDS away from the pain of HTML). What’s more, as a visual person, i could actually lay things out within the tool, instead of coding them abstractly and waiting to see how the browser would render them. If i wanted something to appear over there, i picked it up and put it over there. No futzing around with padding or align tags for hours.

The push towards HTML5 doesn’t scare me – more accurately, it makes me feel ill. It’s a step backwards. Without proper tooling, i see myself banging my head against the wall picturing absolutely everything in codespace (rather than concretely laid out in front of me in designspace), and programming all kinds of exception cases so that my content performs properly depending on platform, browser and version. You know what? No thanks.

Prying Flash from my Cold, Dead Hands

As long as the tools for other technologies stink, and as long as i can keep making and monetizing projects in Flash, i’m going to stay the course until there’s a compelling technological /creative/workflow reason to make a jump. Untold Entertainment has deployed two games written in Actionscript (Sissy’s Magical Ponycorn Adventure and Heads) across two different mobile platforms (Apple iPad and the BlackBerry Playbook), and we’re just getting warmed up. Here are the facts, at the time of this writing:

1. No one really wants to play a game in a browser on a phone. Native apps are where it’s at.

2. Yes, you CAN put Flash- and Actionscript-created content on an iPhone, in native app format.

3. You can even do it without having to buy Flash Professional or Creative Suite.

4. You can develop entirely on a PC until the very last step (uploading content to the App Store).

5. Untold Entertainment is about to show you how.

What You’ll Need

While buying Adobe’s tools is optional, you’ll still need to spend a bit of money (or mug the right people) to pull this off. Here’s what you’ll need:

1. An Apple Developer account, which is $99 USD/year. Once you start down this path, you’re in it for the long haul … if you let your developer account lapse, they pull all your products off the store. For realsies.

2. A Mac (not free) running the latest version of Xcode (free).

3. An iOS device (optional, but obviously recommended).

4. FlashDevelop v4 or better (free, PC-only)

Introducing Sina

Sina Kashanizadeh is a Sheridan College computer programming student and an intern here at Untold Entertainment. He’s done all the legwork in this process, and has written this step-by-step guiding on porting your Actionscript projects to iOS. Take it away, Sina!

Flash on iOS? So You Want to Be a Hero…

With the mobile world expanding at a crazy rate you may have had the crazy idea to try making an App yourself and putting it on the iPhone. Well, you’re a brave soul, because it can be a confusing task. This is why I have scoured the internet and composed a step by step tutorial of this process. This tutorial would not have been possible without the fantastic people that maintain FlashDevelop and the wonderful community behind it. I would also like to thank Lee Brimelow and Adobe for putting out some great tutorial videos that helped me out a lot. Last but not least, I would like to thank CodeandVisual.com for putting up a fantastic comprehensive guide that inspired me to move forward whenever I had trouble writing this tutorial.

I just want to be clear that this tutorial is not the “be-all, end-all” of this process. There are many different ways of transferring your Flash App to iOS, and the problems I cover are specific to my method. Also, the process I cover is PC-specific.

Getting Started

Before we begin, I would like to recommend a very good video resource by Adobe Evangelist Lee Brimelow, in which he explains the basics of adding an app to the App Store when using Flash. If you do not know how this process works, I highly recommend this video, as it breaks down the somewhat painful process of adding an AIR App to the App Store when using a PC (thanks again, Lee!). The good news is that if you go through this once, you’ll understand the ins and outs of the process. You only have to do the most painful parts once.

The video covers a myriad of stuff but the basics boil down to this: Your end goal is to create an .ipa file, which is what you’ll upload to the App Store. To do this you will require:

* An App

* An iOS developer ID from Apple ($)

* An iPad or iPhone ($)

* A Mac ($, but required for one step only … borrow one from a friend!)

* A Signing Certificate

* A Mobile Provisioning Profile

* YOUR SOUL

Sounds like fun? Well it isn’t, but let’s get cracking anyway!

Any Club that would Have Me as a Member

As I mentioned above, you’ll need a developer ID from Apple. Head over to the iOS Dev Center and register for “free”.

Go through the steps of signing up and the email verification and you will acquire an Apple ID. Now, the unfortunate thing is that you get the Apple ID for free, but if you want to develop anything with it on a device – even a silly test app that you will never release – you will have to pay $99 a year. You’d better be positive that your Angry Birds clone will be worth at least a hundred bucks a year in revenue. You can sign up for a free student account, but again you can’t really do anything with it unless you drop some cash. If you are helping someone develop an App for the iPhone/iPad and they are paying the developer fee, they can add you as a partner to their project.

Adding a Device to Your Developer Account

If you want to test and ultimately launch this App, you will need an Apple device such as an iPhone, iPod Touch or iPad. You will also need to register your Apple device with your Apple ID. Follow these steps:

1. Go into the iOS Developer website and log in with your new account info. Here, you will see the iOS Provisioning Portal. Click on it to see further options.

2. click Devices in the sidebar.

3. Click Add Devices. Note: if you are a partner developer with a team member profile, you will not be able to add a device. The option will only appear for the master account holder.

4. On this screen, you can add up to 100 devices to your account. Start off by adding your Device Name. Nothing fancy here – just enter something that will help you identify it – ie “Sina’s iPad”, or “iPhone what i stole from that guy that one time”.

5. Enter the Device ID (40 hex characters). This is the serial number that is associated with the device that you are trying to register. To find this Device ID, open iTunes while your device is connected. On the main screen, you will see all the information about your device, including a field called Serial Number. It doesn’t look clickable, but click on that field anyway and the number changes to a hex code. That’s your device ID.

6. Once you’ve filled in those details, click Submit and the device will be added to your Developer account. Now you can build an Adobe AIR application and test it on your device.

The next tutorial will take you through the process of requesting and creating a Signing Certificate, converting that certificate to the p12 format that Apple requires, and generating a Mobile Provisioning Profile for your new app.(Source:gamasutra


上一篇:

下一篇: