两个影片剪辑冲突,脚本怎么改
actionscript吧
全部回复
仅看楼主
level 1
惊堂瓜 楼主
我在舞台上插入了一个画笔canvas_mc,一个滑块按钮slider5,两个冲突了,我拖动滑块时,画笔也在乱画,如下图,郁闷死我了
2016年09月23日 11点09分 1
level 1
惊堂瓜 楼主
this.createEmptyMovieClip("canvas_mc", 999);
var
isDrawing:Boolean = false;
clear_btn.onRelease = function()
{
canvas_mc.clear();
};
var mouseListener:Object = new
Object();
mouseListener.onMouseDown = function() {
canvas_mc.lineStyle(5, 0xFF0000, 100);
canvas_mc.moveTo(_xmouse, _ymouse);
isDrawing =
true;
};
mouseListener.onMouseMove = function() {
if (isDrawing)
{
canvas_mc.lineTo(_xmouse,
_ymouse);
updateAfterEvent();
}
};
mouseListener.onMouseUp =
function() {
isDrawing =
false;
};
Mouse.addListener(mouseListener);
var left = bar5._x+slider5._width/2-132;
var right = bar5._x+bar5._width-slider5._width/2-117
;
var bottom = top = bar5._y;
slider5.onPress =
function() {
this.startDrag(true, left, top, right,bottom);
};
slider5.onRelease =
function() {
this.stopDrag();
};
onMouseMove = function() {
var per =
Math.ceil((slider5._x-left)/(right-left)*100*0.59);
yy5._rotation = per;
};
slider5.onReleaseOutside = slider5.onRelease;
2016年09月23日 11点09分 2
level 1
惊堂瓜 楼主
上面是脚本
2016年09月23日 11点09分 3
1