I'm guessing it's got something to do with the code on your search button:
First, is myrecord tracing out when you run it?
loadVariablesNum("data.asp?Record=" add myrecord, 0);
Second your loading these variables into _level0 of your flash movie, when in fact you declare your variables on this search button.
Third (and a difference between as1 and as2) is that empty string variables which used to default to 0 in as1 now will default to undefined
Hope some of this gets you going.