你可以使用類似
private static function handleResize() :void {
var deviceSize:Rectangle = new Rectangle(0, 0, stage.stageWidth,
stage.stageHeight);
// adjust the gui to fit the new device resolution
}
stage.addEventListener(Event.RESIZE, handleResize);
// call handleResize to initialize the first time
handleResize();
// Then set quality value
if(stage.stageHeight>200 && stage.stageHeight<380){myImageQualitySwitchVar=1}
if(stage.stageHeight>380 && stage.stageHeight<680){myImageQualitySwitchVar=2}
if(stage.stageHeight>800){myImageQualitySwitchVar=3}
和裏面的三菱商事的要加載你想要的圖像質量,我想創造的東西爲你的形象裝載機像
if(myImageQualitySwitchVar==1){Image01.load(new URLRequest("LowQualityIMG.jpg"));}
if(myImageQualitySwitchVar==2){Image01.load(new URLRequest("MediumQualityIMG.jpg"));}
if(myImageQualitySwitchVar==3){Image01.load(new URLRequest("HighQualityIMG.jpg"));}
其工作很多做這樣,但我能想到的唯一選擇就是爲不同的設備創建不同的版本。即。 4版本,使用SDk x.x和以下的手機和SDk x.x以上手機的手機版本可以獲得不同版本。另外2款適用於SDK x.x之上和之下的特定平板電腦。
希望這有助於。
thx的幫助,但我不認爲這將工作,因爲它不是關於圖像的質量,但問題在於,它需要更大的手機呈現1920x1080像素,而不是800x480的事實。所以在完全相同的構建下,遊戲在較低端手機480p和新手機1080p之間更順暢 – matthy 2014-10-13 20:50:03