Problem parsing dynamic text

[font=Century Gothic]I’m having some issues changing dynamically loaded data from strings to number values so that i can do math with them.[/font]

[font=Century Gothic]basiclly i’m making a game and attempting to load data from a text file, with limited sucess. the name of the characters work because they are a string anyway, but when i try to load the stats of a character ( “&char1_AGL=4&” is in my text file for the AGILITY of character 1, which is four) it’s not working.[/font]
[font=Century Gothic]i know i need to parse the string and make it an integer, but i’m not sure how to setup the code. here’s what i have. i would appreciate any input. my problem is in frame 4, line 2 when trying to add the the time counter to the character’s agility.[/font]

[font=Century Gothic]// frame 1[/font]

[font=Century Gothic]loadStats = new LoadVars();
loadStats.load(“chars.txt”);
loadStats.onLoad = function() {
char1_name = this.char1_name;
char1_AGL = this.char1_AGL
};[/font]
[font=Century Gothic]char_AGL = Number (char1_AGL);[/font]

[font=Century Gothic]// frame 3[/font]

[font=Century Gothic]getPercent = char1_timer/1200;
char1_timebar._width = getPercent*50;[/font]

[font=Century Gothic]// frame 4[/font]

if (char1_active == “false”) {
char1_timer = char1_timer + char1_AGL;
if (char1_timer>=1200) {
char1_active = “true”;
char1_timer = 0;
char1_active = “true”;
menu_char1._alpha = 100;
menu_char1.gotoAndPlay(3);
}
}
gotoAndPlay(3);