Link to home
Start Free TrialLog in
Avatar of super_quest
super_quest

asked on

check internet connectivity - no JavaScript pls

I need to check for internet connection without using JavaScript. Can it be done in Flash and HTML?
What I had initially thought was I will set a background picture of an HTML table column and display an embedded picture and then foreground picture can be set to some picture on the server. If the foreground picture was not found then display a message that you are not connected to the internet.
However, this approach is not correct becoz if the foreground picture is not found then the FileNotFound picture is displayed and this is unacceptable.
Please suggest some solution, JavaScript will not do for my client.

I will try to explain what I m trying to ask. A mail would be sent to a client. The client will download this mail on some mailing client like MS Outlook or Eudora. The first page of the mail would check if there is an internet connection. If the connection is found then it would get the image from a server. This page can change or can be customized.
Is there a way for getting this implemented.
Avatar of Jaymol
Jaymol

You need to do the following...

Put a file online somewhere that has the following in it...

      InternetConnected=1

Then, with your Flash movie do the following...

      Frame 1 Actions:
      ----------------
      InternetConnected = 0;
      loadVariablesNum("http://www.theplaceyouputthefile.com/filename.txt?dummy="+math.random()*999999, 0);

(Obviously change the url and filename to suit.)

Then, at frame 10, put the following...

      Frame 10 Actions:
      -----------------
      if (InternetConnected==1) {
          gotoAndPlay(20);
      }

Frame 11 would say "You are not connected" or whatever you want to do, and frame 20 would be the stuff you do when connected.

That should do the trick.

John.
ASKER CERTIFIED SOLUTION
Avatar of Jaymol
Jaymol

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>A mail would be sent to a client. The client will download this mail on some mailing client like MS Outlook or Eudora. >>

Most mail won't handle Flash.
Webwoman : You can embed a flash movie in an email as long as it is done on the mail server, not the client.

John.
Avatar of super_quest

ASKER

But when we embed a flash movie for checking internet connection it does not always work. When we are connected via proxy it does not work. It works fine when its via a dial up connection.

In that case I'm afraid I can't help you then.  Sorry.

The only thing that could make the above suggestion not work is if the proxy is returning a false value for the load variables command.  If that's the case then you'll not get a method that is 100% accurate.

Let me know if you have any other thoughts.

John.