求助!关于九宫格new cc.Scale9Sprite在网页报错的问题

this.Background = new cc.Scale9Sprite(‘TipsBG.png’, cc.rect(71,67,5,5));
this.Background.width = 490;
this.Background.height = 160;
this.Background.attr({
x : winsize.width / 2 + 30,
y : winsize.height / 2,
anchorX : 0.5,
anchorY : 0.5
});
this.addChild(this.Background,1);
this.Background.setVisible(false);

这段代码在IDE的调试器上是正常的,但在网页上this.Background = new cc.Scale9Sprite(‘TipsBG.png’, cc.rect(71,67,5,5));这句会报错:Uncaught TypeError: undefined is not a function
求助是什么问题?

哦。楼主你没有引入extension模块

谢谢,好像没有引入,新手求教怎么引入。还有为什么没引入模块,在调试器上能运行呢?

模拟器上,固定是引入全部模块的,你在project.json中加一下extension,即可

是extensions,不是extension