cannot convert flash.display::Sprite@39394a9 to flash.display.MovieClip.
here is sample code
enemy class: if anemy is offscreen he will call the deleteEnemy
var enemyArray:Array = new Array();
mySprite = new Sprite();
myEnemy = new Enemy();
for(var i in enemyArray)
if(enemyArray[i] == e)
then it will delete the enemy from stage after that it will call removeChild() from the parent to remove the enemy from the array
then it will get the error above
i guess the problem is, enemy class cant access the removeEnemy() in parent class
but when i remove the sprite like this:
rather than this:
then it will be ok, but my goal is, How can enemy call the removeEnemy() in parent while it is inside the sprite, tnx for the help in advance...