You should really check out the Platform School tutorial here on the forums. You would profit from it a lot!
I changed your cap to work the way most of my platform games do. There's a dummy sprite, which has the actual platform behavior applied to it. The mario sprite will be always set to the dummy's position. Also mario's animations will be always set to the dummy's animations. Those animations are tagged, which means you don't need to specify them with events if you only have the standard stopped/walking/jumping/falling.
A few things I noticed:
You are using many small sprites for the blocks, which all use per pixel collision. Use bounding box collision instead wherever possible. And use as few solids as possible.
The sprite using the platform behavior shouldn't be solid itself.
Make use of layers. It's way easier to select stuff and keep the overlap order. I made one additional layer for the sky already.
You don't need the mirrored directions in your animations. You can have only the direction right for every animation and simply activate AUTO MIRROR under the object's properties.
For a proper placement of mario with my method you would need to adjust to hotspots on the different animations too.
And as I mentioned: read the platform school tutorial, will give you many pointers.