Thanks - the buttons are rectangular - any tips on how to calculate the corner positions if the displacement map is a gradient distorting on both x and y?
-----Original Message----- From: [EMAIL PROTECTED] on behalf of Alan MacDougall Sent: Sat 12/17/2005 10:03 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Displacement Maps, and Button actions 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 _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders