If I remember correctly, a 3640 won't boot completely without a valid image on the flash, so if your flash is erased, the easiest thing to do would probably be to boot off of a flash card with an image on it... sounds like you don't have one of those.
You can load the image either from a flash card, or tftp from a server... If your flash is partitioned, you may need to unpartition it before downloading depending upon the image size.... both procedures should ask if you'd like to erase flash before loading..