How to fetch the variable from flash to browser

Hi,

I had a flash file which plays a video and this one is opened on a
popup window, this video play for atleast 10 sec and actually i want to
trace that till what time the user had view this video.

e.g.: My video runs for 10 sec and user had view this file for 5 sec
and closed it, so my requirement that i should be able to trace that
the user had viewed my video for 5 sec only.

Thanks in advance.

Regards

Prashant Shetty