Many thanks smitchell.
It didn't work for the objects going downwards but I've found a solution, with your code I was able to work it out. But my solution a bit jerky, is it possible for it to be smooth? Here the updated Capx
The problem is that when the moving platform moves down the collision between the player and the object keeps changing. So it's stuttering, it also sometimes automatically moves the player.