# [Flash AS3] Displacement map grief (reward for solution)

## Recommended Posts

xytor    136
First of all I'd like to offer $10 paypal reward to the first poster that solves this (or is most instrumental to me solving it). Anyway, I have a flash game that uses AS3. I use a MovieClip as a layer for all of the game's MovieClip objects (inside of the root). I also want to apply a DisplacementMapFilter to that MovieClip. However, since the displacement map doesn't scale with its target object, and the children move offscreen causing the width and height to fluctuate, I can't position the displacement map perfectly to the screen. Does anybody have a solution or any insight? #### Share this post ##### Link to post ##### Share on other sites One way would be to apply a mask to that movieclip that is the size of your screen, and put that in a container clip. Then apply the displacement filter to that container clip. You might be able to directly apply your screen mask to the clip without putting it into a container, but I'm not sure if the displacement filter uses the unmasked dimensions or not -- have never tried that. Obviously, although this should work, there is performance to think about anytime you are using a full screen mask [quote name='xytor' timestamp='1313988612' post='4852125'] First of all I'd like to offer$10 paypal reward to the first poster that solves this (or is most instrumental to me solving it).

Anyway, I have a flash game that uses AS3. I use a MovieClip as a layer for all of the game's MovieClip objects (inside of the root). I also want to apply a DisplacementMapFilter to that MovieClip.
However, since the displacement map doesn't scale with its target object, and the children move offscreen causing the width and height to fluctuate, I can't position the displacement map perfectly to the screen.

Does anybody have a solution or any insight?
[/quote]