This recipe looks at using the URLLoader
class to load a CSV data file from the Internet. It's very similar to the previous recipe, but it gives you the ability to dynamically load files from the Internet. Thus you can update the files without needing to change the ActionScript program.
Make sure
you have a copy of the data.csv
file somewhere on the Internet. If you don't have a site, you can use DropBox as described in the first recipe of this chapter. This recipe will use a link to my own DropBox folder, but it's much more instructive if you can use your own and change the data to see the effect.
Start by creating a copy of the previous Recipe1
class and name it Recipe2
. This will be our basis.