# \[Flash8/AS2\] Classes and objects

**URL:** <https://forum.kirupa.com/t/flash8-as2-classes-and-objects/249238>\
**Category:** flash\
**Created:** [January 16, 2008, 9:07pm UTC](https://forum.kirupa.com/t/flash8-as2-classes-and-objects/249238 "2008-01-16T21:07:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FunkyT](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@FunkyT](https://forum.kirupa.com/u/FunkyT)\
**Post date:** [January 16, 2008, 9:07pm UTC](https://forum.kirupa.com/t/flash8-as2-classes-and-objects/249238/1 "2008-01-16T21:07:17Z")

</div>

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
