Howard Nager wrote:

Mini update - I've simplified and am loading an image in to a movieclip and 
applying the distortion filter to the movieclip. Much easier...anyhow, before 
applying the distortion i am creating a button in that movieclip. The problem 
now is that the button visually distorts but the hit area doesn't follow. Is 
there any way to offset the hitarea according to the visual distortion?
Since the hit area isn't bitmap data, you can't use a displacement map for it. A possible workaround would be to calculate the new distorted hit area and manually build a button with those dimensions, using MovieClip.beginFill, MovieClip.lineTo, and so forth. Then set its alpha to zero and place it where it'll intercept clicks meant for the visually-distorted button (which you should just disable).

Assuming the button is originally a rectangle, and you're applying a static hand-made displacement map, you should be able to calculate or estimate the transformed corner points of the button. Now, if your displacement map is dynamic, you have a much sticker situation...
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to