@Hemchand wrote:
I am getting this error: ‘SecurityError: The operation is insecure.’
for this code:var winSize = cc.director.getWinSize(); var that = this; var imageURL = "https://discuss.cocos2d-x.org/uploads/default/original/3X/c/9/c9a024cd3656916ac85bb3a01034f8075bc8f827.png"; cc.loader.loadImg(imageURL, {isCrossOrigin : true}, function(err, texture) { var spriteTest = new cc.Sprite(texture); spriteTest.setPosition(winSize.width / 2, winSize.height / 2); that.addChild(spriteTest); });
Posts: 1
Participants: 1