dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Can Actionscript test for this??

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    14
    hi all.

    im putting together a projector application, and want to know if F5 actionscript can be used to test (in any way) for a live internet connection).

    ive thought of loadMovie, which if the user is online, can be grabbed, and replace the text of "checking for internet connection" with "you ARE connected to the internet", but then if the connection is dropped, the loaded movie would remain. so is there there a way of checking for a continuous live connection to the internet?

    thanks again.

    natasha banrett

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    108
    If you want a more "continuous" check, I guess you could use XML sockets somehow. But you'd need to have a socket server on the net then, which your application could talk to... But it really seems waaay complicated.

    I dunno what your application is suppose to do, but I can't think of many that actually needs a continous live connection to the net. I'd imagine that checking every now and then, or just checking when data is transferred, would be sufficient for most types of applications... Or?

    --
    @ndre

  3. #3
    Senior Member dipkya's Avatar
    Join Date
    Mar 2001
    Location
    Mumbai (India)
    Posts
    158
    Hi,
    check http://www.northcode.com
    You may find answer here. A good third party appl. to work with flash.

  4. #4
    Senior Member
    Join Date
    Nov 2000
    Location
    Manchester, UK
    Posts
    454
    I did this yesterday, but would really like to know how to do it in director too.

    Put a text file on a server with &liveConnection=true& in it.

    In the Flash movie
    Load variable http://yourserver.com/liveConnection.txt level0

    Then set up a loop to check : -
    frame label Check connection
    if _root.liveConnection==true
    goto contentinflash needing connection
    else
    play
    t=t+1
    into a timer loop
    frame label timer loop
    if t >= 60
    goto offline content
    else
    goto Check connection

    Hope the mad pseudo code makes sense to you, good luck,
    Jon 8o)



  5. #5
    Junior Member
    Join Date
    Mar 2001
    Posts
    14
    thx jonathan, i'll give this a go tonight...

    natasha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center