我有一个图像查看器电影,在HTML中,它的大小定义为百分比宽度= 80%和高度= 80%。电影中有一个垂直的TileList,而且电影中的缩略图比较多。所以除了Tilelist之外通常还有一个scrollBar。当我调整浏览器窗口的大小时,电影大小调整好,但滚动条消失了!这是电影中的一些代码:
stage.addEventListener(Event.RESIZE, resizeHandler);
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
.
.
.
function resizeHandler(e:Event):void {
movieBackground.height = stage.stageHeight;
movieBackground.width = stage.stageWidth;
movieBackground.x = 0;
movieBackground.y = 0;
thumbs.columnWidth = stage.stageWidth / 6;
thumbs.rowHeight = stage.stageHeight / 6;
thumbs.columnCount = 1;
thumbs.rowCount = (stage.stageHeight) / thumbs.rowHeight;
thumbClip.x = stage.stageWidth - thumbs.columnWidth;
thumbClip.y = 0;
resizeCurrentImage();
}