Detecting Internet Connection

Suppose I have a very long SWF (let’s say it takes about 20 minutes for one to go through the whole movie).

At the end of the movie I would like to check if the user is still connected to the Internet (they maybe on an unstable dial-up connection and lost connection).

Is there anyway to do that? I mean, is there a way to check if a user is connected to the Internet using ActionScript?

Thank you!