Splitting a URL string

I have the following url that I am capturing in Flash. http://localhost:47/images/imageMap.aspx?data=16&type=rs&efr=97. I need to capture the number from data(16 in this case) and can’t quite figure it out. If I do a split on ‘=’ it gives me 16&type, I just need the 16. The url will change and so will the number of digits for the data number.

Thanks!