简体   繁体   中英

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

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

So far this is minimum 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>

where test.swf can be FLASH8 project.. The true is, there are some differences which I must investigate. I don't believe that there is no solution.

UPDATE: So it looks the main difference is, how are used relative paths for shared content .. For example lets say I have such a file structure:

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

Then when I want to importAssets from shared_content.swf into level1.swf, which is loaded from main.swf, in Flash player I use path ' data/shared_content.swf ', but for AIR I must use just ' shared_content.swf '. It means in AIR the path is not relative to root SWF file, but to the file which is importing.

The rest seems to be working so far.. I will update again if I find some other difference.

In other than simplest case, no . AS2 scripts are misbehaving when loaded into AIR app (which is always AS3). Some issues I've seen: Stage.width and Stage.height is always 0, sometimes Mouse.addListener doesn't work, mouse wheel may not work. The more complex are scripts, the more errors will arise.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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