The setchildindex method allows you to move the position of the display object in the display list up or down. You can consider the display list as an array. Its Index position starts from Layer 3. If you create three display objects, they are located at Layer 0, 1 and 2. The second layer objects are outside, and the second layer objects are in the innermost layer.
If you want to move a video clip to the innermost layer of all display objects, you can use setchildindex (mymovieclip, 0) to execute this statement, and the remaining objects will be automatically upgraded to a layer, and their index locations are added with 1, the original 0th layer elements moved to the 1st layer, the 1st layer elements moved to the 2nd layer ......
If you want to move a display object to the top of all objects, you need to use the numchildren attribute, which means the number of objects displayed in the container. For example, a container now has three display objects. The value of numchildren is 3, and the Level list is Layer 1 and Layer 2, respectively. The depth of the outermost layer is the numChildren-1 layer. Setchildrenindex (mymovieclip, numChildren-1)