Have you tried a conditioner. It may be due to your head not getting the vitamins and nutrients it needs. It's like growing grass. If you give it good fertalizer it will look better and the ground will be in better condition. I do:
shampoo (head and shoulders)
wash it out immediatly
pantene pro v conditioner
leave it in while I wash my body
rinse out the conditioner
shampoo imediatly following that
and rinse out the shampoo immediatly again
that is my shower routine. I have to say it has help my hair a lot. I used to flake a lot too. Head and shoulders helped some but if I used something else just for one day, my head would itch like the dickens and I would flake again. It wasn't until I started using conditioner that it really seems like it has actually cured it.