Originally posted by BluePriest:
@Aesica- IVe never done anything aside from classes extending a specific movieclip. How would the coding work for this?
public class enemyclass extends ????? ? Im not sure what I would have it extend. And then have the specific enemy ships be
public class enemyship5 extends enemyclass Im guessing that the specific enemies would extend the enemyclass.
It’d pretty much work like this:
public class EnemyShipTemplate extends MovieClip
// code and properties common to every enemy ship goes here
And, for specific enemies
public class RedEnemyShip extends EnemyShipTemplate
// code specific to ships that blow up go here
You’d do the same for any other enemy ships. Anything in EnemyShipTemplate that you didn’t declare as private is automatically accessible to things that extend it, just as functions like addChild are automatically accessible to anything that extends MovieClip.