URLVariables Decode

i have a text file with some data in it. now when i read it with actionscript 2.0 Loadvars class, it gives the proper results and can read each variable. however in actionscript 3.0 the decode method is giving error saying that : “Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.”

can some one help.