Game Development Reference
Let's combine this with jqi?deh`naj inside a bkn loop to view the instance names of all the objects
on the stage:
1. Add the following code to the constructor method:
2. Save the I]ej[>qc?]p_dan*]o file and test the project. This loop runs for as many times as
there are objects in the display list, which is the number provided by jqi?deh`naj. You'll see
something that looks similar to this in the Output panel:
You can see from this list that in order to get the _]p to appear above the other objects, you need to
move it to the end of the list, to position -0. Another built-in method called oap?deh`Ej`at can do
this for you.
To move the _]p to the end of the display list, you can use oap?deh`Ej`at to give it a position number
that is one less than the number provided by jqi?deh`naj (it has to be one less to compensate for the
fact that the list starts at zero). oap?deh`Ej`at takes two arguments: the name of the object and
the position you want to move it to.
1. Add the following to the constructor method: