# Is there any way to change the layering of objects in Actionscript 3 without altering the run order?

I'm making a simple platformer in Adobe Animate, and I need the player to be layered in front of the stage because of a gimmick in the game. Unfortunately, whenever I change the layering order, it also seems to change the order that AS3 runs the instances.

Is there any way to change the layering order without affecting the instance order, or vice-versa?

I'm only just starting with programming, so please bear in mind that I probably won't understand many of the technical terms.

You should not be processing game logic by looping over DisplayObject.children. That array is primarily for the display system to use. You should keep your own, separate Vector containing the instances you want, and run them in your own order, whatever that may be (e.g. sort them first).
Whenever you need to bring something to the top layer, you can call the this.addChild(player_mc) again. that make it come back to the top.