This is not quite an OS-related issue, I don't believe there's a way to do this natively in an OS. Flash objects on a web page can't really be recognized as ads or as just regular flash objects.
There is one way to get rid of ads as far as I know - I use Firefox
, which has a huge collection of community-made extensions (aka addons). One of them is AdBlockPlus
, which I can't live without. You simply add it to Firefox, go to options and choose a subscription (since you can't recognize what's an ad and what's not, it uses a blacklist of flash objects from certain sites that provide ad services), and restart Firefox. I haven't seen an ad on the internet in over a year.