在通常的表达中,在表示相对路径的时候在前面加this和不加this基本上一样的,联知是我没有好好看教程还是FLASH的一个BUG,在
mousemove = new Object();
mousemove.onMouseWheel = function(delta) {
if (滑块._y-delta>滑块.top && 滑块._y<滑块.bottom+delta) {
滑块._y -= delta;
} else if (滑块._y>滑块.top && 滑块._y<滑块.bottom&&delta>0) {
滑块._y -= 1;
}else if (滑块._y>滑块.top && 滑块._y<滑块.bottom&&delta<0){
滑块._y -= -1;
}
};
//这个是正确的
和
Mouse.addListener(mousemove);
mousemove = new Object();
mousemove.onMouseWheel = function(delta) {
if (this.滑块._y-delta>this.滑块.top && 滑块._y<this.滑块.bottom+delta) {
滑块._y -= delta;
} else if (this.滑块._y>this.滑块.top && this.滑块._y<this.滑块.bottom&&delta>0) {
this.滑块._y -= 1;
}else if (this.滑块._y>this.滑块.top && this.滑块._y<this.滑块.bottom&&delta<0){
this.滑块._y -= -1;
}
};
Mouse.addListener(mousemove);
//这个是错误的
是不一样的,当然了如果用绝对路径是正确的,如果有知道此区别的告知小弟,我在这里先谢了
转载于:https://www.cnblogs.com/allymoon/archive/2004/10/12/51139.html