我怎样才能使这项工作?我需要从引用中删除单词 Button 以引用将被着色的实际项目。先感谢您。
disagreeButton.addEventListener(MouseEvent.ROLL_OVER, mouseRollOver);
contentMain.clickButton1.addEventListener(MouseEvent.ROLL_OVER, mouseRollOver);
function mouseRollOver(e:MouseEvent):void {
var c:Color = new Color();
c.setTint (0xFFFFFF, 1);
//the issue is this line:
this[e.target.name.replace( "Button", "" )].transform.colorTransform = c;
}