开发者

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

开发者 https://www.devze.com 2023-02-03 07:35 出处:网络
Is there any simple way how to pack existing Flash8 project usi开发者_高级运维ng AS2 and multiple files to to Adobe Air application?So far this is minimum app.xml:

Is there any simple way how to pack existing Flash8 project usi开发者_高级运维ng AS2 and multiple files to to Adobe Air application?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消