繁体   English   中英

如何从现有的FLASH8项目创建Adobe Air应用程序?

[英]How to create Adobe Air application from an existing FLASH8 project?

有什么简单的方法可以将使用AS2和多个文件的现有Flash8项目打包到Adobe Air应用程序中?

到目前为止,这是最小的app.xml:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<application xmlns="http://ns.adobe.com/air/application/2.5">
  <id>my.app.id</id>
  <versionNumber>1.0</versionNumber>
  <filename>test-app</filename>
  <description/>
  <name>Test AIR app</name>
  <copyright/>
  <initialWindow>
    <content>test.swf</content>
    <systemChrome>standard</systemChrome>
    <transparent>false</transparent>
    <visible>true</visible>
    <fullScreen>false</fullScreen>
    <aspectRatio>portrait</aspectRatio>
    <renderMode>auto</renderMode>
    <width>646</width>
    <height>468</height>
    <maximizable>true</maximizable>
    <minimizable>true</minimizable>
    <resizable>false</resizable>
  </initialWindow>
  <icon/>
  <customUpdateUI>false</customUpdateUI>
  <allowBrowserInvocation>false</allowBrowserInvocation>
  <installFolder>Test AIR app</installFolder>
  <programMenuFolder>Test AIR app</programMenuFolder>
</application>

其中test.swf可以是FLASH8项目。确实是,我必须研究一些差异。 我不认为没有解决方案。

更新:因此看起来主要区别在于,如何使用共享内容的相对路径..例如,可以说我有这样一个文件结构:

main.swf
data/level1.swf
data/shared_content.swf

然后,当我想从shared_content.swf importAssets到level1.swf,这是从的main.swf加载,在Flash播放器我用路径“ 数据/ shared_content.swf”,但对于AIR我必须只使用“shared_content.swf”。 这意味着在AIR中,路径不是相对于根SWF文件,而是相对于要导入的文件。

到目前为止,其余的似乎仍在工作。如果发现其他差异,我将再次更新。

在最简单的情况下, 将AS2脚本加载到AIR应用程序(始终为AS3)时,行为异常。 我见过一些问题:Stage.width和Stage.height始终为0, 有时 Mouse.addListener不起作用,鼠标滚轮可能不起作用。 脚本越复杂,就会出现更多的错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM