[Flash8/AS2] Classes and objects

How do you make objects? Like, I have
mcGoblin [enemy]
mcZombie [enemy]

How do I make coding so that I can just say
with (enemy)
{
//insert AI
}

instead of
with mcGoblin1 {doai} //instance names
with mcGoblin2 {doai}
etc