用flash builder創建手機項目以及發布app需要注意的細節


1.在項目包與bin—debug同級建一個resource文件夾,放swf文件,xml配置文件,這個文件里的內容都是在最終發布App打包時要包含的,bin-debug中的資源文件包括swf文件,xml配置文件等是在調試時會調用的,所以即使resource文件夾與bin-debug中的資源大致相同,二者用途不同

2.最好在GameModel中定義兩個公共常量,在主類構造方法中賦值,方便項目中使用

GameModel.getInstance().screenWidth = stage.fullScreenWidth;
GameModel.getInstance().screenHeight = stage.fullScreenHeight;

3.

public function myPuzzleDictionary()
{
super();


stage.setOrientation(StageOrientation.ROTATED_RIGHT);//設置了這個屬性后,寬高可能會反過來,例如1280×800,可能會變為800×1280,相應的顯示對象坐標位置就要調整
// 支持 autoOrient
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.EXACT_FIT;

stage.displayState = StageDisplayState.FULL_SCREEN;

這幾個舞台屬性要設置一下

 

4.src目錄下 項目文件名+ -app.xml 這個文件打開,其中有4處需要設置,一是

<!-- A universally unique application identifier. Must be unique across all AIR applications.
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
<id>net.4ggc.PuzzleDictionary</id>

二是

<!-- The name that is displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name>Puzzle Dictionary</name>

 

三是

<autoOrients>false</autoOrients>//設為false就不會橫屏豎屏來回切換了(一般在108行)
<fullScreen>true</fullScreen>
<visible>true</visible>
</initialWindow>

四是

<icon>
<image36x36>assets/icon36.png</image36x36>
<image48x48>assets/icon48.png</image48x48>
<image72x72>assets/icon72.png</image72x72>
</icon>

//(一般在128行)發布app用的小圖標,存放在src文件中的assets文件夾中

5.菜單欄項目——導出發行版


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM