How to get bitmap .z to work?

I'm kinda new to JS, not really sure why the z-axis is not working.

I have these functions:

Scene_Title.prototype.create_circle_object = function() {this.circle_object = new Sprite(ImageManager.loadTitle1(circle_sym));this.circle_object.x = circle_sym_x;this.circle_object.y = circle_sym_y;this.circle_object.anchor.x = circle_sym_anchor_x;this.circle_object.anchor.y = circle_sym_anchor_y;this.circle_object.opacity = circle_sym_opacity;this.circle_object.z = 999;this.addChildAt(this.circle_object, 3);}And this:

Code:
Scene_Title.prototype.create_magic_circle = function() {	this._sprite_mgc = new Sprite(ImageManager.loadTitle2("Magic_Circle"));	this._sprite_mgc.x = 50;	this._sprite_mgc.y = 50;        this._sprite_mgc.z = -500;	this._sprite_mgc.anchor.x = 0.5;	this._sprite_mgc.anchor.y = 0.5;	this._sprite_mgc.opacity = 0;	this._sprite_mgc.blendMode = 1;	this.addChild(this._sprite_mgc);}

And yet, the "Magic Circle" with z -500 ALWAYS appears over the "Circle Object" with z 999.

 

What could be happening?

 

I haven't encountered viewports in JS, otherwise that's my first thought to blame... I tried switching the update order and creation order but nothing.
There is no real z-axis in MV, sprites will appear in the order they appear in their parent's children array (which usually is the order you added them, unless you were sorting the array or use addChildAt() to add new children before older ones). Every Sprite can act as a viewport by adding children to it.
There is no real z-axis in MV, sprites will appear in the order they appear in their parent's children array (which usually is the order you added them, unless you were sorting the array or use addChildAt() to add new children before older ones). Every Sprite can act as a viewport by adding children to it.
Perfect, thank you! That helped me solve it. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-bitmap-z-to-work.50591/