Could anyone direct me to information for beginners in flash programming or give me some samples of code. I searched on the net, but I could not find anything.
Look in the flash data sheets / application notes. They tell you everything that you need to know! The code is fairly trivial to do exactly what they say (sending the correct bits, in the correct sequence).