Invert preloader text

Hi, I want to make a preloader where the text inverts when the bar overlaps it, but only the pixels that are overlapping. Let’s just use This Tutorial as an example and say that the text was on the load bar instead. Is there a way to make the text invert as the bar overtakes it? Maybe with actionscript or something?