PDA

View Full Version : Using LoadVariablesNum to Verify Connection


Roadkill
03-20-2001, 08:43 PM
I saw another post about using the LoadVariablesNum in a Flash .exe file to check a connection and setting active to true through a text file. Well I did this and it works but right after I have an if statement that is used to go to a different frame if they don't have an active connection. This is used to display an email button if there connection is active. Preferably I would like it to continue checking and switch between the the two frames.(In case they sign on there connection while the Flash program is running.)

Thanks For Your Help,
Jesse

Jesse
03-21-2001, 07:28 AM
How about making an MC which runs through and every 10 seconds or so checks for the Inet connection then.. I don't really get your question...

Cheers

Jesse

Roadkill
03-21-2001, 01:48 PM
I am creating a order form that is going to go on a demo cd, if the user has an active internet connection I want to give them the choice of emailing the form to us. If they do not have a connection there only choice will be to print the form out. I want to continousily check for an active connection. If the connection is active the email button will also be active. But if there is no connection the only choice they will have is to print.

Jesse
03-22-2001, 12:04 AM
I see. SO have a looping MC which checks every 10 seconds using LoadVariables. Your email button can be an MC with 2 frames. First frame is a greyed-out version of the button, 2nd is the real button. If at any stage you get an active connection you can send the email-MC to the 2nd frame and they can click it...

Cheers

Jesse

Roadkill
03-22-2001, 04:31 AM
Thanks - You the Man

Jesse

Roadkill
03-22-2001, 03:03 PM
How do you do a 10 second pause?

Thanks,
Jesse

Jesse
03-22-2001, 10:51 PM
Assuming youw ant to begin the first pause when the movie starts:
Int he first frame of your movie set the variable _root.wait to 10 (to wait 10 seconds).
Then create an MC and add this code:

onClipEvent (enterFrame) {
if (_root.delay) {
if (Math.floor(getTimer()/1000) == _root.lastTime+1) {
_root.delay = false;
}
} else if (Math.floor(getTimer()/1000) == _root.lastTime+_root.wait) {
_root.count = _root.count+1;
_root.lastTime = Math.floor(getTimer()/1000);
// YOUR ACTIONS TO OCCUR EVERY 10 SECONDS GO HERE
_root.delay = true;
}
}

Cheers

Jesse