Labs

It works in my machine!

Always on Top

with one comment

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!

Written by Raúl

April 21st, 2009 at 5:24 pm

Posted in AS3, General

Tagged with

One Response to 'Always on Top'

Subscribe to comments with RSS or TrackBack to 'Always on Top'.

  1. thanks, saved me quite some time

    Rob Geertsen

    12 Nov 09 at 18:09

Leave a Reply