음.. 액션은, 우선 공을 무비클립하시구요, 이액션을 넣어주세요.
onclipevent (load) {
sx = 10;
sy = 10;
}
onclipevent (enterframe) {
this._x = this._x + sx;
this._y = this._y + sy;
if ((this._x + (this._width / 2)) > 550) {
sx = sx * -1;
}
if ((this._x - (this._width / 2)) < 0) {
sx = sx * -1;
}
if ((this._y + (this._width / 2)) > 400) {
sy = sy * -1;
}
if ((this._y - (this._width / 2)) < 0) {
sy = sy * -1;
}
}
|