on (press) {
startDrag("", true);
this._alpha = 50;
}
on (release) {
stopDrag();
this._alpha = 100;
if (this.hitTest(this._parent.ball1) == true) {
this._x = this._parent.ball1._x;
this._y = this._parent.ball1._y;
}
} |
1行目 ボタンを押したら
2行目 ドラッグを可能にし、
3行目 アルファを50にする
4行目
5行目 ボタンを離したら
6行目 ドラッグをやめ
7行目 アルファを100にする
8行目 もし、ボール1と重なっていたら
9行目 x座標はボール1と同じにし
10行目 y座標はボール1と同じにせよ
|