Send to back - undoubtedly the easiest function to perform, you use the setChildIndex()function, which takes too arguments, an existing object on the display list, and an index to set it to. To "send to back" something, just set its depth to 0:

setChildIndex(example,0);

Bring to front - like the Send to Back function but a little harder because we have to assess where exactly the front is! With everything piling on top of everything else, it is perhaps a little difficult. Have no fear though- we can use a nice thing called numChildren to help us. numChildren equals the numberof items there are on the display list, but the first one is numbered 0, so we will have to deduct one from that:

setChildIndex(example,numChildren - 1);

Bu makale 284 kere okundu.

Share to Facebook Share to Twitter Share to MySpace Stumble It Share to Reddit Share to Delicious More...

 

   

altering-depth



Linkler



Son Yorumlar

  • Erhan

    tam aradığım konu ama eksik...

  • zuleyha

    burcumu nasil okuyabilirim ...

  • kerem bora

    Maili dün yazmıştım, bugün ...

Twitter