———将MXML编译为SWF文件

You can deploy your application as a compiled SWF file or as a SWF fuke included in an AIR application, or if you have Adobe LiveCycle Data Services ES, you can deploy your application as a set of MXML and AS files.
你可以部署你的程序作为一个swf文件,或者作为swf包含在AIR程序中,或者如果您有Adobe LiveCycle数据服务ES,您可以将MXML和AS文件作为你的应用程序的一个集合部署在上面。

If you are using Flex Builder, you compile and run the compiled SWF file from within Flex Builder. After your application executes correctly, you deploy it by copying it to a directory on your web server or application server. Users then access the deployed SWF file by making an HTTP request in the form:
http://hostname/path/filename.html
Flex also provides a command-line MXML compiler, mxmlc, that lets you compile MXML files. You can use mxmlc to compile hello.mxml from a command line, as the following example shows:
cd flexInstallDir/bin
mxmlc --show-actionscript-warnings=true --strict=true c:/appDir/hello.mxml
In this example, flexInstallDir is the Flex installation directory, and appDir is the directory containing hello.mxml.
The resultant SWF file, hello.swf, is written to the same directory as hello.mxml.
For more information about mxmlc, see “Using the Flex Compilers” on page 125 in Building and Deploying Adobe Flex 3 Applications. For more information about the debugger version of Flash Player, see “Logging” on page 227 in [i]Building and Deploying Adobe Flex 3 Applications[/i].
如果您正在使用Flex Builder,您从Flex Builder的内部编译和运行SWF文件。在您的应用程序执行正确之后,您可以通过将其复制到您的Web服务器或应用服务器目录中的方式来进行部署。然后,用户再通过一个HTTP请求的形式访问已经部署的SWF文件:
[i]http://hostname/path/filename.html[/i]
flex公司也提供了一个命令行MXML编译器,mxmlc,它可以让您编译MXML文件。您可以如下面的例子那样使用mxmlc从命令行对hello.mxml进行编译:
[i]cd flexInstallDir /bin
mxmlc --show-actionscript-warnings=true --strict=true c:/appDir/hello.mxml[/i]
在这个例子中,flexInstallDir是的Flex的安装目录,appDir是包含hello.mxml的目录。
由此产生的SWF文件hello.swf被写入到hello.mxml的同一目录内。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值