cc.Class({ extends: cc.Component, properties: { scrollContent: { default: null, type: cc.Node }, scrollView: { default: null, type: cc.ScrollView }, mainScrollPrefab: { default: null, type: cc.Prefab }, }, // LIFE-CYCLE CALLBACKS: onLoad () { var mainScroll = cc.instantiate(this.mainScrollPrefab); this.scrollContent.addChild(mainScroll); this.scrollView.node.on('scroll-ended', function (e) { }) }, start () { }, // update (dt) {}, });