Cheat Engine works on games that store their state on your own machine and have no protection against it. Most single-player and offline Flash games fall into that category.
Online and server-side games are a different matter. Anything where the important calculations happen on a server cannot be meaningfully altered from your end, and online games generally prohibit this outright. Some client-side values, like game speed, can still be tweaked, but anti-cheat and protection layers will block the tool from attaching in the first place.
So the practical rule is simple: offline single-player, yes; anything with a server calling the shots, no.