FLASH中this的一个问题

在通常的表达中,在表示相对路径的时候在前面加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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值