ActionScriptでドラッグ&ドロップ2 ドラッグ領域を限定
ActionScriptでドラッグ&ドロップを実現するスクリプトの第2回目(第一回目)。今回は範囲を限定したドラッグのサンプル。
function Ball() {
this.onPress = function() {
this.startDrag(false, 0, 0, 100, 100);
};
this.onRelease = function() {
this.stopDrag();
};
}
var o = new Ball();
_root.attachMovie('ball', 'ball', _root.getNextHighestDepth(), o);
コメントはまだありません。
コメントの投稿
改行と段落タグは自動で挿入されます。メールアドレスは表示されません。
利用可能な HTML タグ :
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite="">
<cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>