To tell the Truth, I don't think avast! blue ball icons in system tray should spin at all when you are sending or receiving attachments through the messenger program. That's just how it works. Maybe Alwil can explain that a little bit better so they can correct me if I'm wrong. Even if you receive some "bad" attachment, it will be scanned with standard shield that's sitting in the background, as soon as you try to open/execute suspicious file.
As far as Yahoo! Messenger goes, it is exactly the same as with MSN Messenger. Open a list of Instant Messenger provider and put a checkmark on Yahoo! Messenger. Inside Yahoo! Messenger, search for OPTIONS or settings (I have no clue since I stopped to use that crap of messenger program a long time ago). I am 100% sure there is an option saying SCAN RECEIVED FILES, or SCAN ATTACHMENTS or something similar. I'm not going to install that ugly messenger program just because of this, so you have to search for that option yourself. I repeat, I am 100% sure there is an option because I installed Yahoo! Messenger on my friend's PC 2 or 3 months ago and I set it to scan all attachments (received/sent files) with avast!
Inside that section, there is also an empty box where you should put the path to your antivirus scanner. It's exactly the same as with MSN Messenger. This is the path that you need to enter inside:
C:\Program Files\Alwil Software\Avast4\ashQuick.exe... and that's it... you're good to go...
Cheers !
EDIT: More things why I am against Yahoo! Messenger, you can read in this thread started by my friend P3t3rb0nn :
http://forum.avast.com/index.php?topic=16129.0Read everything, and don't forget to click on a link he provided in his initial post (first one)