The 777 can fly the same distance and do it more economically ( so I've heard) and it seems the routes dominated by 747s a few years ago are being switched to 777.
The 777 and 747 have very similar economic operating characteristics. However, if a market can support it, the 747 rakes in the moolah at a much better pace than the 777 can. The problem right now is that with an economic downturn, most markets to/from the US cannot support a 747. That will change with the next economic upsurge.
"The A340-300 may boast a long range, but the A340 is underpowered" -- Robert Milton, CEO - Air Canada