onClipEvent(load) { _root.score = 0; _root.score -= 10; _visible = false; speed = 3; // スピード RotSpeed = 3; // 弾の回転スピード this._x = _root.player._x; this._y = _root.player._y; // ターゲットとのラジアンを求める rad = Math.atan2(_root.target._y - _y,_root.target._x - _x); rot = rad * Math.PI / 180; // ラジアンから角度に変換 _rotation = rot; // 回転 } - onClipEvent(enterFrame) { if (_visible) { // 的と弾の角度 rad = Math.atan2(_root.target._y - _y, _root.target._x - _x); rot = rad * 180 / Math.PI; // ラジアンに変換 // 角度を丸める if (_rotation - 180 > rot) { rot += 360; } if (_rotation + 180 < rot) { rot -= 360; } // 現在の角度と比較して近い方に少し回転 if (_rotation - rot > RotSpeed) { _rotation -= RotSpeed; } else if (_rotation - rot < -RotSpeed) { _rotation += RotSpeed; } else { _rotation = rot; } // 的と弾の角度 rad2 = _rotation * Math.PI / 180; // 移動量を計算 dx = Math.cos(rad2) * speed; dy = Math.sin(rad2) * speed; _x += dx; _y += dy;
if (_x > 800 || _x < 0 || _y > 590 || _y < 0) _visible = false; } if (!_visible) { _x = _root.player._x; _y = _root.player._y; _root.score += 10; _visible = true; } }
【質問】 っていうスプライトを個数を決めてちょっと遅らしながら(10フレームくらい)複製したいのですが
【回答要望】 どこにどういう風にどんなASをかく。
例.増やしたいMCのenterflameに※※※というASを書く
みたいな感じで(*・.・)ノ ヨロシクニャン・:*:・゚'★.。・:*:・゚'☆♪です