When you scrolled the ebay page it had that affect, but it was not in the entire page, just in the description area of it.
Basically you attach the flag to the background (fixed).
Then the pole moves normally as the page moves. Use z-index and move the flag on top of the pole, and it's quite a cool effect.