Definitely. There are guides out there that do better explaining, but the bare bones of it is you write the code with Actionscript, compile it, and (assuming all's good and well) voila you have a Flash game that probably works. The hard part is writing the Actionscript.
Stencyl is something that you could use to create flash games easily. It's basically for beginner game makers that want to create flash games easily but don't know how to code.
The only free program is Flash Develope, but you still need to know how to program AS3 and its more difficult for beginners to use then Flash Professional, which is 700$.
GOM, is Stencyl swf file? Cuz I want to download it and put in AG.
It does export it as a SWF, but getting it on AG is a different story. These programs never fully compare to the real thing, so making a good game would be difficult. You would still need to create your own art to start with. It says online that you can still use AS3 in collaboration with this, and that's what changes everything. In game maker, the quality of the games you can make is very low, until you start using game makers programming language. While you might be able to create a decent game with this, if you can't program I'm not sure you can reach AG's quality standards.