Flash Code That Fits Any Screen Width

Flash

This snippet adapts to any screen width and keeps the main content centered, which cleanly solves the clash between 1920/1440-wide screens and 1024-wide ones. The code itself is dead simple — drop it into frame 1 of the Flash main timeline.

Stage.scaleMode = "noScale";
        onEnterFrame = function(){
         Fish_bg._width = Stage.width;
}

HTML embed code:

<embed width="100%" height="230" src="/images/banner.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" menu="true" loop="true" play="true" scale=""></embed>

Leave a Comment

Comments 1

  • 小皮
    小皮 2014-12-29 22:40 Reply

    好代码!可以参考效果。

Table of Contents