today i found my self trying to put an Sprite on the top of the display list
so here is the basic idea for solve that problem
1
2
3
4
5
6
7
8
9
10
11
function alwaysOnTop_handler(e:Event):void {
//make this child always on top!
parent.addChild(this);
}
function added_handler(e:Event):void {
parent.addEventListener(Event.ADDED, alwaysOnTop_handler, false, 0, true);
}
addEventListener(Event.ADDED_TO_STAGE, added_handler, false, 0, true)
cheers!