When your check engine light comes on in a Subaru, it disables the cruise control (thus why it is flashing). Take it to your local dealer, it's still under warranty Check Engine light comes on due to a wide range of possible problems, automatically disabling the cruise control as mentioned above. The problems can range from sensor issues (MAF, Oxygen Sensors, Etc.) to a loose gas cap, to condensation, to a loose connector on a sensor, perhaps even a dying battery, a flaky alternator or a faulty battery terminal connection.
It is a catch-all problem indicator. If you are lucky, you can simply reset the ECU by disconnecting the battery for a minute, and the Check Engine light will be gone and cruise control will work. If the error persists, you need to get the error code (if you do not have a code reader or accesspoint, stop by Autozone or somewhere similar and get them to read it for you) see what the error is, and fix the problem.
Simple? Hopefully it's not something more troublesome, bad injector, etc.