I have had problems like this on various Casio and all were the result of lens being distorted ( dropped ) or grit / sand etc in the lens assembly
As before I have solved most dirt problems by blowing with compressed air around the lens while it trys to open -
there are a number of potential solutions posted on U-tube - but only try if you feel the professional repair cost are more than the cost of replacing the camera
pc6493, October 2009