zoukankan      html  css  js  c++  java
  • 用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.菜单栏项目——导出发行版

  • 相关阅读:
    [USACO][最短路]Cow Tours
    [USACO][枚举]Preface Numbering
    [USACO][枚举]Hamming Code
    [USACO][枚举]Healthy Holsteins
    [USACO][DAG上的动态规划]Sorting A Three-Valued Sequence
    [USACO][暴力]The Castle
    [USACO][枚举]Ski Course Design
    运算符重载must take either zero or one argument错误
    关于js鼠标事件综合各大浏览器能获取到坐标的属性总共以下五种
    鼠标滚轮事件封装
  • 原文地址:https://www.cnblogs.com/kuailezoe/p/2945196.html
Copyright © 2011-2022 走看看