1 Reply Latest reply on Feb 1, 2007 4:55 AM by MotionMaker

    class or not?

    jagguy99


      I want to create animation with a few MC's say for a game. I want each MC to be a class to simplify things eg a mc for me and a random number for 'aliens'.
      Each 'alien' has its own class with events properties etc.

      To record the movieclip events for each alien would i include them in a class or just have a property to hold the MC' s name.
      Each alien would have to move a certain way so I would need a setinterval or gettimer function to write to do this?
        • 1. Re: class or not?
          MotionMaker Level 1
          1. Yes you can create a AlienGamePiece class to represent the mc. You can attach the class in the library properties and instantiate on stage with attachMovie.

          2. You can use MovieClip.onEnterFrame in the class as a timer and assign/unassign a function(s) to it dynamically in the class.

          Probably rather than reinvent the wheel is to look up some of the Flash game books on Amazon so you do not waste effort.