home > Flashのフルスクリーン設定
Flashのフルスクリーン設定
March 09, 2007
function onResize(){
 //拡大設定
 w = this.bg._width;
 h = this.bg._height;
 scale_w = stageCtrl.width / w * 100;
 scale_h = stageCtrl.height / h * 100;
 scale = Math.max(scale_w, scale_h);//大きい比率を検出
 this._xscale = this._yscale = scale;
 //座標設定
 w_shift = stageCtrl.width / 2 - w / 2 * scale / 100;
 h_shift = stageCtrl.height / 2 - h / 2 * scale / 100;
 this._x = w_shift;
  this._y = h_shift;
}
こんな関数を設定する。
そこでもう一つ需要な事は、クオリティを"high"に
_quality = “high”;
して、画像にスムージングをかける。
これで、画像が拡大されてもガタガタになりません。
こまい事ですが、すぐに忘れるのでメモ。
