A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Another Internet Speed Test

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    3

    Another Internet Speed Test

    Howdy all,

    I am completely new to Flash and have no idea what I'm getting myself into.

    My company has computers throughout the Texas and I have been tasked with getting internet speeds for all of them. I will need download, upload, and latency. I currently have a Javascript based program, but it appears to be unreliable. Various forums and other speed test sites are leading me to believe that Flash is the best way to accomplish this.

    The script will have to run automatically, with no user interaction. I will then need to automatically put the results into a mySQL database. I have already set up the database, and am familiar with PHP / MySQL. I just don't know where to start for the flash portion of this project.

    I would appreciate any input as to where to start and where I might find sample code to mimic.

    Thank you for your time.

  2. #2
    Administrator Steve R Jones's Avatar
    Join Date
    Nov 2011
    Location
    Largo, FL.
    Posts
    133
    I know you mentioned "with no user interaction"... But instead of reinventing the wheel the following might help or lead you in another direction.

    This is one of the most popular sites for testing speeds:
    http://www.speedtest.net/

    And they offer this:

    You can host a free speed test on your own server that uses the same technology as Ookla Speedtest! Setup is very simple, and the only requirement is that your web server supports PHP, ASP.NET, ASP or JSP.
    http://www.speedtest.net/mini.php



  3. #3
    Junior Member
    Join Date
    May 2014
    Posts
    3
    Thank you for the recommendation, however I have tried their mini test but do not see a way to export into mysql or PHP. I would also need a way to have this start automatically.

    They also don't provide the flash document, just the swf, so I can't edit anything to tweak this to fit my needs. Although, I am new to Flash. Do you know of a way to get this working the way I want?

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    Flash is a programming language so you can set up a test yourself. From what you've said, you just need to set up a test that gives you results for comparison. The key being comparison. You don't need your app to figure out the exact speeds, you just need it to do a specific test and you can compare the results.

    Put specific-sized files on a server, 1mb for instance. Your app starts a timer, requests to load the file, when the download starts you have a rough latency number (good for comparison), when the download completes you have a time to download 1mb. Same with uploading files.

    You can use somebody else's test to give you some real numbers to compare against your app and come up with a good approximation. Speedtest says you're the device has a 1.2mb connection, you can create formula against that number.

  5. #5
    Junior Member
    Join Date
    May 2014
    Posts
    3
    Thank you for the input. As I mentioned, I am very new to Flash / AS3. I don't mind working through the problem, I just don't know where to start for the solution. I am reading up on the timer functions and checking out examples on the net to determine how to mold them to fit my needs. What other functions do you recommend for this project?

  6. #6
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    gotoandlearn.com has video tutorials by a programmer. republicofcode.com has good tutorials on the code.

    If you're a programmer, use adobe.com reference.

    Attached is a example flash.

    Here's pieces of code for timer and loader.

    Code:
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    
    
    public function Main() {
    	var loader: Loader = new Loader();
    	loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fLoaderLoaded);
    	loader.load(new URLRequest("monkey.png"));
    }
    
    private function fLoaderLoaded(e: Event): void {
    	var b: Bitmap = e.target.content as Bitmap;
    	b.x = 100;
    	b.y = 100;
    	mcMonkeyPic.addChild(b);
    	msgField.text = "loaded";
    }
    
    
    
    timerMain = new Timer(20);
    timerMain.addEventListener(TimerEvent.TIMER, fTimerMain);
    
    
    private function fTimerMain(e: TimerEvent): void {
    	//trace("fTimerMain");
    
    	e.updateAfterEvent();
    }
    Attached Files Attached Files

Tags for this Thread

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