Below is my code. It works with no errors, but the outcome is not what I wanted. When the enemy is killed, a gold coin will drop. However, my gold coin is being pinned to the main stage in upper left corner. Even when I tell it NOT to. I want the MC “coin” to appear where the enemy died, NOT in the upper left corner of the stage. I tried codeing specific x, y cordinates for the coin, and still nothing! Please help a young flash game developer Thanks!
onClipEvent (mouseDown)
{
if (this.hitTest(_root._xmouse, _root._ymouse))
{
_root.eHealth -= random (7) +1;
_root.hp -= random (5) + 1;
}
if(_root.eHealth <= 0)
{
this.unloadMovie();
_root.attachMovie(“money”,“gold”,200);
gold._x = 200;
gold._y = 250;
}
}