引用:
原帖由 chenwangke 于 2008-4-6 04:01 发表 
....重新再检查了一下.可以输出out了.但,还是有那个问题.就是鼠标移到a1..a2.....这些按扭上时就自动触发了out.
2楼的代码是没有问题的,楼主的做法有问题吧。
复制内容到剪贴板
代码:
for (var p:Number = 3; p>=0; p--) {
this["_btn"+p].label = "按钮"+(p+1);
this["_btn"+p].onRelease = function() {
_txt.text = this.label+"被点击";
};
}
this.back_mc.onRollOut = function() {
if (!this.hitTest(_xmouse, _ymouse)) {
_txt.text = "鼠标移出了"+this._name;
}
};
this.back_mc.onRollOver = function() {
_txt.text = "鼠标在"+this._name+"中";
};