マスクをドラッグアンドドロップで動かす
マスクにしたmc(en_mc)に、下のようにscriptで制御して、マスク範囲をドラッグアンドドロップできるようにした。
Actionscriptは、すべてactionレイヤー内に書きました。
this.en_mc.onPress = function () {
startDrag (this, true); // ドラッグを開始する
}
this.en_mc.onRelease = function () {
stopDrag (); // ドラッグを解除する
}
this.en_mc.onReleaseOutside = function () {
stopDrag (); // ドラッグを解除する
}
this.en_mc.onMouseMove = function () {
updateAfterEvent(); // ドラッグをなめらかに
}
Actionscriptは、すべてactionレイヤー内に書きました。
this.en_mc.onPress = function () {
startDrag (this, true); // ドラッグを開始する
}
this.en_mc.onRelease = function () {
stopDrag (); // ドラッグを解除する
}
this.en_mc.onReleaseOutside = function () {
stopDrag (); // ドラッグを解除する
}
this.en_mc.onMouseMove = function () {
updateAfterEvent(); // ドラッグをなめらかに
}