title: How can I make a flash as3 drop shadow overlap something else?
body: <p>So I am porting a game I started in html canvas to flash as3. </p>
  
  <p>In this game there is a tank. This tank has a body and a turret. It can rotate 360 degrees and move foward and backwards and swivel it's turret 360 degrees. The tank base and the turret are seperate animated images.</p>
  
  <p>I have set it up so that there is a tank movieclip and a turret movieclip. And I have added code to the tank movieclip so that it creates a turret for itself in the constructor part like this. </p>
  
  <pre><code> turret= new turretMovieClip();   
   addChild(turret)
  </code></pre>
  
  <p>So the tank movieclip class now has this turret variable that holds an instance of the turret movieclip. Also in the constructor of the tank movieclip, there is code to give itself a shadow. </p>
  
  <pre><code>var dropShadow:DropShadowFilter = new DropShadowFilter();
  dropShadow.distance = 5;
  dropShadow.angle = 45;
  dropShadow.color = 0x000000;
  etc....
  this.filters = new Array(dropShadow);
  </code></pre>
  
  <p>But this is the weird part. I expected the code above to only put a shadow around the tank because this is code for the tank movieclip. But it put a shadow around the tank and the turret. When I added the turret, the tank movieclip changed or something! I did not want this to happen. I want the tank to have it's own shadow and the turret to have it's own shadow.</p>
  
  <p>Here is an image I made illustrating the problem:
  <a href="https://i.stack.imgur.com/EJuf3.jpg" rel="nofollow noreferrer">http://i.stack.imgur.com/EJuf3.jpg</a></p>
  
  <p>Fig #1 is from my old game. The shadow correctly casts itself over the tank and the ground. Fig #2 shows what the above code did. It gave a shadow for the tank and turret, but it only casts over the ground. Anyone know what I am doing wrong? I think I could fix this by making a master tank class that then creates a tank movieclip and then a turret movieclip. Is that how I'm supposed to do this?</p>