Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is this a limitation of flash? 1

Status
Not open for further replies.

Bignewbie

Programmer
Feb 22, 2001
351
PH
hello guys!

i have a bit of a brain storm up my head, and would like to ask..... can flash detect the connection speed of the user? i mean, can i know if the user is using cable or dial-up or whatever? it would really be nice if flash can detect it! is there a script or something that can make flash do that?

just thinking, coz my boss wants me to know how!


thanks

big
 
I suppose you could create a 'calculator' in a pre-preloader using the gettimer function when bytes loaded = 0 and when bytesloaded = totalbytes. Use the old physics equation (v=d/t ie: connection speed=totalK/(gettimer@total/gettimer@0) to get the speed it took to load.

you could just create a 10K pre-preloader to detect the speed. Does that help? I don't know of an inherent function in Flash which does this.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
I suppose you could create a 'calculator' in a pre-preloader using the gettimer function when bytes loaded = 0 and when bytesloaded = totalbytes. Use the old physics equation (v=d/t ie: connection speed=totalK/(gettimer@total-gettimer@0) to get the speed it took to load.

you could just create a 10K pre-preloader to detect the speed. Does that help? I don't know of an inherent function in Flash which does this.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
NOT a duplicated post. NOTE the red minus. davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
dav,

i hope u dont mind but could u make one for me (if its not much of a bother?). i would really like to study it for its has a lot of potential usage in my site. Hope u do!

thanks and Godspeed!


biggie
 
ok, here's a sample I've knocked up. When I load the page my time says 1K/second, which is relatively accurate as my connection is quite fast at the minute (yes I said FAST) ;-)


let me know the accuracy on your side when you test it, it might be complete guff, but it's worth a go

dave

uploading the fla now davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 

Just emptied my cache (REMEMBER to do this before every test you make) and tested again and I'm still pretty accurate over here (around the 1K mark).

My only concern with this would be with a very fast connection, would it even register (but I guess that's the whole point, duh);-)

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
dav,

all i see here (except your trademark) is :


7219 in a box.

what does that mean?


big
 
excellent (but not for me), just got a 0.3K/second connection time, looks like the net's gone back to normal for the day! :-( davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
dav,

all i see here (except your trademark) is :


7219 in a box.

what does that mean?

well, its not necessary that the speed be shown, all i need to do is to know it then probaly pass it a an ASP file but for testing purposes it would really be nice if the current speed is shown!


big
 
hmmm, I'm getting that now too, hold on and I'll check it.

If you right-click on it and select forward a couple of times you'll see what you would have seen had it worked for you (albeit the numbers will be all wrong cos the swf didn't work properly).

back in a tick
dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
dav,
ignore the what does that mean comment! just saw your update!
nice but i get these:

at first try : 2.1 K/second
2nd try: 553.7 K/sec
3rd try: 581.3 K/sec


and i'm on 56 K modem! is that logical? (or possible?)


big


 
the first one might be, did you empty your 'temporary internet files' before testing the second and third times?

and I take it your talking about the version which pop-up the word "successful"?

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
scrub that last comment about deleting temp files, a fine example of me being awake far too long and applying dumb reverse logic to things.

i guess the best judge of this will be if other people test it on various connections and posts their results?

I just tested again and it's still accurate for me. Between 0.5 and 1K on my side, but if it's like that for everyone it might be worth inserting a larger image in the movie to increase the file size and give the movie something to gets its teeth into to calculate more accurately.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
i just tested it on my 256K connection at work and it returned a transfer speed of 41.4K/sec. Looks pretty normal to me considering all the slackers on msn messenger all day! Nick Price
nick.price@misuk.net
 
cheers Nick, I think one more test from someone would legitimise the fact that it does work successfully. I also think the 2.3K is very much possible on yours Big.


AAAAAAAAAAARRRRGHHHHHHHH, somebody pour some water over my head, just noticed a fine example of my double-reverse logic (I NEED SLEEP!!!) DON'T scrub the comment I made, it's legit! LOL ;-) :) :-( :p (suffering a nervous breakdown....too many numbers....too much thinking..........) davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
cable modem=265.6k dave is there anything you can't do..must be nice to have all that knowledge..sheesh..
 
dav,

thanks for the examples man! im quite impressed! i didn't think u could make that in such a short time. sory about the delayed reply i went out to bring my girlfriend home from work. just got back online.

and u were right i didn't empty my cache on the second and third time! so this fla only works if not cached right! just what i needed! thanks man. and i think stars are shining brightly tonite!

biggie


ps

dav, why did it asked for username and password when i try to download your fla?



 
eh, dont get the password thing, have you got it now?
(sorry for the delay, been sleeping)

dave

davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
dave,


thanks! just downloaded it. will playing with it for some time.

i just woke up myself, so that exlains the late reply.

big
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top