flex開發零碎筆記,隨時補充

來源:互聯網
上載者:User

1 水平方嚮往返移動背景圖片時,圖片會發生閃爍(有點像地震),在網上翻來覆去的尋找資料,終於找到了不是很完美的解決辦法(可能是背景圖太大還是偶爾有點抖)。

方法如下:hallImg是圖片對象,spriteMain是Sprite對象

hallImg.smoothing = true;
hallImg.pixelSnapping = PixelSnapping.AUTO;

----------------------------
   var m:Matrix= new Matrix();
   m.scale(1.001,1.001);// 稍微放大強迫消除鋸齒
   spriteMain.transform.matrix= m;

 

2 flex ari 設定表單全屏,並且能夠讓TextField輸入東西(這個我當初可是花了10兩銀子提問的)
   stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

 

3 迴圈播放背景音樂。

var sound:Sound = new Sound("音樂檔案路徑");

// 迴圈播放N次,int.MAX_VALUE夠聽幾十年
sound.play(0,int.MAX_VALUE); 

4 使用starling開發AIR程式時報“This application is not correctly embedded (wrong wmode value)”錯誤

設定XX-app.xml檔案中的renderMode項為direct,就解決了

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.