1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
{pan1.onPress = function() {
pan2.dragging = false;
start = _root._xmouse;
newStart = pan1._rotation;
dragging = true;
};
pan1.onRelease = function() {
dragging = false;
};
pan1.onReleaseOutside = function() {
dragging = false;
};
//
pan1.onEnterFrame = function() {
sound1 = new Sound(fader1);
sound1.attachSound("sound1.mp3");
if (dragging) {
pan2.dragging = false;
pivot = (_root._xmouse-start)*2+newStart;
pan1._rotation = pivot;
if (pivot<-135) {
pan1._rotation = -135;
}
if (pivot>135) {
pan1._rotation = 135;
}
level = Math.round(pan1._rotation/1.35);
}
sound1.setPan(level);
};
};
{pan2.onPress = function() {
pan1.dragging = false;
start = _root._xmouse;
newStart2 = pan2._rotation;
dragging = true;
};
pan2.onRelease = function() {
dragging = false;
};
pan2.onReleaseOutside = function() {
dragging = false;
};
//
pan2.onEnterFrame = function() {
sound2 = new Sound(fader2);
sound2.attachSound("sound2.mp3");
if (dragging) {
pan1.dragging = false;
pivot2 = (_root._xmouse-start)*2+newStart2;
pan2._rotation = pivot2;
if (pivot2<-135) {
pan2._rotation = -135;
}
if (pivot2>135) {
pan2._rotation = 135;
}
level2 = Math.round(pan2._rotation/1.35);
}
sound2.setPan(level2);
};
}; |
Partager