MEDIASCOPE README
This folder contains all the tools you need to build and run Mediatrace. Go through the following steps to set up Flash Player, Flex SDK, a Flash IDE, apache and PHP:
1. Flash Player
Mediascope needs Flash Player 10 or higher to build and run. Download the latest version of Flash Player (with debug--important) at http://www.adobe.com/support/flashplayer/downloads.html. There are separate versions for IE and Firefox.
2. Flex SDK
Download the Flex SDK from http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK. Download the latest build (it doesn't really matter what version, but it must be later than 4.0).
3. Set up a Flash IDE
You don't need an IDE to develop Flash, but you'll probably want one. Two main versions exist: Flex Builder, sold by Adobe, or FlashDevelop, which is free. Both are good IDEs, but I have only testing this app with Flex Builder 4 -- I'm not sure if Flex Builder 3 will work. To download FlashDevelop: http://www.flashdevelop.org/community/viewtopic.php?f=11&t=6956.
If you're using Flex Builder, create a new project (make sure it's a "Browser" and not "AIR" project), delete the contents of that project's "src" folder, and drag the contents of mediascope_project/src directly into that "src" folder. Back in the IDE, set the default application to MTWSMAProject.mxml.
If you're using FlashDevelop, you do not need to create a project. Just open up mediascope_project/Mediascope.as3proj.
With either IDE, make sure that in the compiler options, the SDK is set to the SDK you downloaded in Step 2. If it's set to an earlier one, it won't build properly. In FlashDevelop, "compiler options" opens automatically when you build for the first time.
4. Install and configure Apache
Install Apache, if you don't have it running already. You can download at http://httpd.apache.org/download.cgi#apache22. I'm running version 2.2; I haven't tested on earlier versions so I'm not sure it they'll work. You can install on either port 80 or 8080, but I currently have Mediascope expecting 80, so if you want 8080 you'll need to change the urls to the proxies are correct in WSMATalk and GrabFile (change "http://localhost/proxy.php" to "http://localhost:8080/proxy.php"). You'll also have to make some changes to httpd.conf (just change "80" to "8080" everywhere).
There aren't too many changes you have to make to the default Apache configuration. All Apache is needed for is to run PHP. Just follow the instructions in "apache_config_instructions.txt" to edit your httpd.conf.
Once Apache is installed, drag the contents of "apache" into the root directory for Apache (this is "htdocs" by default).
5. Install PHP on Apache
I've included a folder ("php") that contains a php version, along with my configurations (php.ini). Drag this into C:\. (You can put it somewhere else if you want, but then you need to modify the path to it in httpd.conf.) Double-check your apache/php installation by browsing to http://localhost/test.php. If you get the PHP configuration page, apache and php work. If you get an error, check your configuration.
Now that everything's set up, you can build and run the app in the IDE you chose. (In FlashDevelop, build is F8 and run is F5). There will be warnings, but there should be no errors. When the application launches, it should launch in a browser. If it tries to launch in any other fashion, it is configured incorrectly. To see if apache is installed correctly, try logging into the default account (username/password user1/mine). Then try creating a new account. If both of these work, the application can both read and write and apache and php are installed correctly.
Note that by default, this configuration runs in "test" mode, meaning that it does not need to be connected to a router or for a flow to be chosen to run. It just runs off of randomly generated data. If you want to try to connect to an initiating node, change the "test" variable in "graph_components.NetworkLayout" to "false". Make sure the router you're connecting to is WSMA-enabled and that the access restrictions allow external HTTPRequests. For a list of WSMA configs to execute on your initiating node to make it work with Mediascope, see "wsma_configs.txt". Also, within Mediascope, make sure the Mediatrace admin-params ("config session params") are set appropriately (if the timeout and frequency are set wrong, the app won't ever retrieve any data because it'll never be available).