Listen for data transmission

Hi guys, I was wondering if there were any methods or techniques out there to listen for data loading or receive indication that there is external data transmission . Basically I want to build a loading icon that appears whenever the flash file downloads external data, like images,videos, xml etc. I know I could just include a function in every method I have that loads external data, but this seems tedious and it’s hard to keep track of all of them since this will be a big project.

Thanks for any help