View Full Version : automatic bandiwdth detection
greenbear
02-26-2002, 08:47 PM
I'm sure there is a simple answer for this one but I can't seem to figure it out. It's easy enough to detect flash but is there an easy way to detect bandwidth and then re-direct the user based on this information. What I'm trying to do is use flash to detect flash but also use it to detect highbandwidth and then send the user off to that site. Any ideas??
Jesse
02-26-2002, 11:12 PM
I've never seen any way to do this. I made a preloader a while ago which detects download speeds usign (getBytesLoaded()/1024)/(getTimer()/1000) . That will give you how many KB per second the user is drawing, My version then automatically forwarded them to a lower bandwidth edition and the like, but i can't show it to you coz it's no open source.
greenbear
02-26-2002, 11:37 PM
Thanks for the reply Jesse. Are you sure there isn't a way to do this? I've seen something that had to do with gettimer but could you elaborate a bit more on your actionscript, I'm not sure what you mean.
Jesse
02-26-2002, 11:49 PM
The onle way I know of is to divide the bytes downloaded by the time it took. In my case I divided kilobytes (given by getBytesLoaded()/1024) by how many seconds the movie had run for. getTimer() returns thousandths of seconds since the movie began, so getTimer()/1000 gives the time in seconds. So I loaded the high bandwiwdth by default but if the time remaining (given by the remaining bytes divided by the download speed) was too great, it auto-jumped to a lower bandwitdh version. There's no way to do it without starting a download as far as I know. Also note that for the first 1.5 seconds or so the download speed figures will be stupid.
farafiro
02-27-2002, 11:07 AM
I believe that this (http://66.70.72.50/forum/tutorials/adv_double_click/index.html) tut might help here
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.