开发者

Actionscript 2 Scaling Down (not up)

I am looking for a way to scale a flash website (using actionscript 2.0) to different resolutions. People with smaller screen resolutions are having issues seeing my full flash website, and setting the parameters to 100% width and 100% height solve that issue but create another one... It makes the site look out of开发者_运维百科 proportion and pixelated for people with larger screen resolutions.

My question is- how can I use actionscript to scale the website down, but only up to the original stage width and height? I've seen similar questions asked before, but only using AS3. Somehow there is a way to switch from exactfit to showall depending on browser size?


you can get the screen resolution then decide the stage scaleMode

trace(System.capabilities.screenResolutionX);

trace(System.capabilities.screenResolutionY);


resX = System.capabilities.screenResolutionX;
resY = System.capabilities.screenResolutionY;
//let's say
if (resX >= 1280 && resY >= 800)
{
    Stage.scaleMode = "noScale";
}
else
{
    Stage.scaleMode = "showAll";
}


I'm also interested to see if setting the _root's xscale and yscale to different percents would properly adjust the whole thing, get back to use please!

_root._xscale = 50; //50%

_root._yscale = 60; //60%

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜