首页 > 专家说

flash鼠标拖动MC的代码,AS高手进

来源:江南娱乐-意甲尤文图斯亚
时间:2024-08-17 10:05:47
热度:

flash鼠标拖动MC的代码,AS高手进【专家解说】:aa_mc.onPress = function() {if (aa_mc._width<=800 && aa_mc._hei

【专家解说】:aa_mc.onPress = function() { if (aa_mc._width<=800 && aa_mc._height<=600) { return; } this.startDrag(); }; function onMouseUp() { stopDrag(); } aa_mc.onEnterframe = function() { if ((this._x<800-this._width)) { this._x = 800-this._width; } if ((this._x>0)) { this._x = 0; } if ((this._y<600-this._height)) { this._y = 600-this._height; } if ((this._y>0)) { this._y = 0; } }; 但是必须保证MC的坐标原点在左上角
Baidu
map