how to center this background call?

How can I center the image on a wide screen ?

Scene_Album_TT.prototype.createBackground = function () {
this._backSprite = new Sprite();
this._backSprite.bitmap = ImageManager.loadTripleTriad(this.image_list['AlbumBackground']);
this.addChild(this._backSprite);

I tried :
Scene_Album_TT.prototype.createBackground = function () {
this._backSprite = new Sprite();
this._backSprite.bitmap = ImageManager.loadTripleTriad(this.image_list['AlbumBackground']);
this._backSprite.bitmap.x = Graphics.width/2;
this._backSprite.bitmap.y = Graphics.height/2;
this.addChild(this._backSprite);


even this does not show changes:
this._backSprite.bitmap.x = Graphics.boxWidth/2;
this._backSprite.bitmap.y = Graphics.boxHeight/2;

there is another action that I must do in order to let it work?
maybe this is only a definition and must be called?
@Xyonel Hmm, you seem to be setting the X and Y value of the bitmap and not the sprite.

Code:
this._backSprite.x = Graphics.width / 2 - this._backSprite.width / 2;
this._backSprite.y = Graphics.height / 2 - this._backSprite.height / 2;

// Or
this._backSprite.anchor.set(0.5, 0.5);
this._backSprite.x = Graphics.width / 2;
this._backSprite.y = Graphics.height / 2;
thanks, could you explain me how anchor.set works ? and why is needed?
@Xyonel You do not have to set the anchor property, but doing so means a little less math when you want to center the sprite. Basically, anchor sets the origin point of the sprite. If you have ever tinkered with the 'Origin' option in a 'Show Picture' event command, this is exactly the same (but more customizable). By default, the anchor points are set to 0 and 0 which means the origin point for the sprite is the top left. By setting the anchor to 0.5 and 0.5 the origin point is the center of the sprite. The origin point would be the bottom right if set to 1 and 1.
thanks, very useful.
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/how-to-center-this-background-call.115535/