Reputation: 1541
It used to happen in AS2.0 as follows :
my_Mc.onPress = function()
{
trace( this)
}
//output :
[my_Mc Movieclip]
However in AS3.0, i wonder how to achieve this
my_Mc.addEventListener( MouseEvent.CLICK, click) ;
function click(e:Event)
{
trace( this ) ; // output is the class instance, where the handler is being used
// How to get the instance of my_Mc here ????
}
thanks.
Upvotes: 0
Views: 203