myObj={}; btn1.onPress = myObj.test = function(){ trace(this); } btn1.onPress(); // _level0.btn1 myObj.test(); // [object Object]