1. Drag it to the stage. (this will be a flash event );
2, addchild ();
For example:
VaR A: A = ();
VaR B: B = B ();
VaR C: C = C ();
Addchild (a); // The depth of A is 0, the lowest layer.
Addchild (B); // The depth of B is 1
Addchild (c); // The depth of A is 2, top layer. The display sequence is CBA.
That is to say, C Blocks B and B blocks A, the same below.
//////////////////////////////////////// /////////////////////////////////////
3, addchildat ();
For example:
VaR A: A = ();
VaR B: B = B ();
VaR C: C = C ();
Addchild ();
Addchild (B); // The display is Ba
Addchild (C, 1 );
C is in the middle. Now the depth of C is 1, and the depth of B is changed from 1 to 2. The stage shows BCA;
There are two other methods:
, 4, setchildindex:
Pin top: container. setchildindex (Object C, container. numChildren-1 );
Background: container. setchildindex (Object C, 0 );
5, getchildindex:
Before inserting object B: setchildindex (Object C, getchildindex (object B ));
After inserting object B: setchildindex (object, getchildindex (object B)-1 );
I hope it will help you.
Deep control of Components in Flash.