AS3 Vertical platform movement collision help

I have been making a platform game based on the Foundation Flash Game Design book. I have run into a vertical platform collision problem. I will highlight the problem:

The platform moves vertically upwards and downwards

When the player jumps on the platform that is moving upwards the collision on the top is detected and his vertical position gets updated and he remains on the platform

Now when the platform starts going down there is no collision and the player falls down towards the platform and here once again the top collision is detected and he stays on top.

I am trying hard to fix this but i am running out of options, how do i detect that the platform is going down so that his vertical position stays on the platform??

I tried keeping the platforms vertical position equal to the players vertical position but alas the jump does not work and when i move him off the platform he falls down with a greater speed as his gravity adds to his vertical value.

I sincerely hope any of the great guys in this forum help me out in this

I have attached the fla and the source file please do help me as this is my first game is as3 and apart from this i would have completed the game