展示
配置滚动条代码
const container: egret.DisplayObjectContainer = new egret.DisplayObjectContainer();
this.addChild(container);
const scrollView: egret.ScrollView = new egret.ScrollView();
scrollView.setContent(container);
scrollView.width = this.stage.stageWidth;
scrollView.height = this.stage.stageHeight;
this.addChild(scrollView);
let img = new egret.Bitmap(RES.getRes("bg_jpg"));
container.addChild(img);
img.width = this.stage.stageWidth;
img.height = this.stage.stageHeight * 2;