About masking

I am using masks to create a flashlight effect. I have managed to mask the floor of the room but cant seem to mask the aliens as im unsure what code will mask the aliens. Here is the swf so you can see :slight_smile: btw bugs is the aliens that i want to mask as well if that makes any sense.

here is the engine.as

 private var thelight:light;
           private var theplayer:player;
           private var theroom:room;
             //private var thebug:bug;
                 public static var enemyList:Array = new Array();
                private var theHUD:HUD;

            // private var numbugs:int = 1;
            

             
           //private var intSwarm = setInterval(addSwarm, 10000);

          

         
        //our constructor function. This runs when an object of
        //the class is created
        
        public function engine()
        {
            
            //private var theplayer:player = new player(stage);
            //add it to the display list
            
            
             //private var thelight:light = new light(stage);
            //add it to the display list
            
            //thebug = new bug(stage, bx , by);
            thelight = new light(stage);
            theplayer = new player(stage);
            theroom = new room();
            theroom.mask = thelight;
            theHUD = new HUD(stage); //create our HUD
            
            
            
            

            
            
            //stage.addChild(thebug);
            stage.addChild(theroom);
            stage.addChild(thelight);
            stage.addChild(theplayer);
            stage.addChild(theHUD); //and display it.