I have already foud out where I want to place my sprites in my game, and I don’t want to have to go through th elengthy “duplicateMoveClip” procdure (or it seems to be lengthy to me anyways, it’s probably like 2 lines of code, but still, I WANNA DO IT MY WAY!) ok, anyways, does delete only work on variables and not movie clips?
here’s what I have so far
this is in the bullet movie clip:
onClipEvent ( enterFrame){
if (Key.isDown (Key.SPACE)){
this._x=_root.circle._x;
this._y=_root.circle._y;
}
then
{this._x-=20;}
if (_root.bullet.hitTest(_root.enemya)){
_root.enemya.removeMovieClip();
}
if (_root.bullet.hitTest(_root.enemyb)){
delete this;
}
if (_root.bullet.hitTest(_root.enemyc)){
_root.enemyc.removeMovieClip();
}
if (_root.bullet.hitTest(_root.enemy1)){
_root.enemy1.removeMovieClip( );
}
if (_root.bullet.hitTest(_root.enemy2)){
_root.enemy2.removeMovieClip( );
}
if (_root.bullet.hitTest(_root.enemy3)){
_root.enemy.removeMovieClip( );
}}
enemy b is the closest enemy to the “hero” so I experiment with him usually before I apply any code to the entire thing.
So my question to you guys is, how do I delete a movie clip in a movie via actionscript?