现在的位置: 首页 > 综合 > 正文

用Flex开发移动应用(1)—- 创建一个新的Mobile工程

2018年04月10日 ⁄ 综合 ⁄ 共 725字 ⁄ 字号 评论关闭

摘译自《Hello World: Build a mobile app in five minutes》:http://www.adobe.com/devnet/flash-builder/articles/hello-world.html

本例不仅适用Android,同样适用于其他设备,如iOS、BlackBerry Tablet OS等。(原文如此,我的Flash Builder只支持Android)

1、打开Flash Builder4.5
2、File > New > Flex Mobile Project
3、工程名HelloWorld
4、其他值为缺省值,Next
Specifying the Flex project location

在”Mobile Settings“中,选择平台为Google,应用程序模板为“基于视图”

Specifying the mobile settings of the Flex project

这一步是可选的,在同一个对话框,点击“权限”,可以设置程序的权限。此处维持缺省(允许Internet)

Determining the mobile app's permissions

“服务器设置”,维持现状

Selecting the application server technology used by the mobile app

最后一步,此处只需要修改最下面的Application ID。如果只是为了测试,什么名字都可以。但如果是实际使用,需要使用一个“fully qualified domain name”的名字。比如,“com.mydomain.MyApp”就是一个好选择。MyApp是你程序实际的名字。本例中,使用“com.mydomain.HelloWorld

Adding libraries or source paths used by the mobile application

点“Finish”后看到以下

Flex mobile project ready to code in Flash Builder

当你创建Flex mobile工程时,Flash Builder产生了以下文件:
1、ProjectName.mxml:程序文件,通常你不需要直接在里面加内容。
2、ProjectNameHomeView.mxml:这个文件代表工程的初始屏幕,Flash Builder places the file in a package called "views."

抱歉!评论已关闭.