Heres a sidescrolling shooter engine I coded that you may use to learn from. It has a basic platform engine and various weapons. It uses basic trigonometry to calculate the angle to shoot the bullets. The last weapon is a laser tripwire which is pretty cool, I haven't even used that in a game yet. Feel free to edit and modify the code as you wish. Just don't use the graphics in any released projects. Hope this is helpful for you to make your own game.
Have a go at the engine here - WASD to move in test. Number keys to select Weapon. Mouse to shoot.
(Has Sound Effects)
Download the .fla file here