2011-01-07 28 views
1

有什麼簡單的方法如何將使用AS2和多個文件的現有Flash8項目打包到Adobe Air應用程序?如何從現有的FLASH8項目創建Adobe Air應用程序?

+0

As2的投影機能否完成這項工作(例如Screenweaver(http://screenweaver.org/doku.php?id=docs:as_api),mProjector(http://www.screentime.com/software/flash-投影機/ flas.html)還是鋅(http://www.multidmedia.com/software/zinc/))? – 2011-01-10 00:06:55

回答

0

在非最簡單的情況下,。加載到AIR應用程序(始終是AS3)時,AS2腳本行爲異常。我見過的一些問題:Stage.width和Stage.height始終爲0,有時 Mouse.addListener不起作用,鼠標滾輪可能不起作用。腳本越複雜,錯誤就越多。

1

到目前爲止,這是最低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項目..真正的是,還有許多事情必須調查一些差異。我不相信沒有解決辦法。

UPDATE: 所以看起來主要的區別是,如何使用相對路徑共享內容 .. 例如可以說我有這樣的文件結構:

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

然後,當我想到importAssets從shared_content.swf到level1.swf,這是從的main.swf加載,在Flash播放器我用路徑「數據/ shared_content.swf」,但AIR我必須只使用「shared_content.swf 」。這意味着在AIR中,路徑不是相對於根SWF文件,而是相對於正在導入的文件。

其餘的似乎工作到目前爲止..我會再次更新,如果我發現一些其他的差異。

相關問題