Woo! Almost there!

So I modified your script somewhat to my needs:

[AS]var salBase = new LoadVars();

//salBase.Sal = new Number(); //this does nothing, since LoadVars

//salBase.MA = new Number(); // always imports strings

salBase.onLoad = function(ok) {

// trace(salBase.Sal+ +salBase.MA);

if (ok) {

//this is where your Number conversions go (as before)

//sal_txt.text = Number(salBase.Sal) + Number(salBase.MA)

//or if you want multiple values from a string like salBase.MA

//split the string first with delimiter “

” which is %0A

//then convert each of the resulting strings into a Number

var Sal_array = salBase.Sal.split("###");

for(index in Sal_array)

Sal_array[index] = Number(Sal_array[index]);

//‘new’ is optional with the Number function

//then to add them all together,

var sum = 0;

// for(index in Sal_array)

// sum += Sal_array[index];

//it would better to perform both actions with a single for loop

//like this

for(index in Sal_array)

sum += Number(Sal_array[index]);

sal_txt.text = sum;

trace(salBase.Sal.split("###"));

trace(Number(Sal_array[0]) + Number(salBase.MA));

}

};

salBase.load(“TeachSals.txt”);

[/AS]

However, I don’t want to add all the values of Sal together; instead, I would like to add the 1 value of MA to each Sal value:

&Sal=30500###30700###30900###31100###31300###31500###31700###

32000###32300###32600###32900###33200###33730###34450###35230###35950###36980###38220###39460###40900###42300###43780###45220###46590###48025&MA=3000&SP=4000&PhD=5000

Also, what is the best way to format this into currency when I’m done?

I know it would be quicker/easier to just list the already computated values, but I already know how to do that and want to learn more. So thank you for your time and help.

Thanks,

Andy