# Loadvars problem

**URL:** <https://forum.kirupa.com/t/loadvars-problem/189771>\
**Category:** Uncategorized\
**Created:** [June 6, 2006, 3:50am UTC](https://forum.kirupa.com/t/loadvars-problem/189771 "2006-06-06T03:50:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grinfax](https://avatars.discourse-cdn.com/v4/letter/g/ee59a6/32.png) [@grinfax](https://forum.kirupa.com/u/grinfax)\
**Post date:** [June 6, 2006, 3:50am UTC](https://forum.kirupa.com/t/loadvars-problem/189771/1 "2006-06-06T03:50:09Z")

</div>

I am trying to load and parse data from an external file map.txt (below).

I would like to have the results come out like:

marker0 = …  
title0 = …  
description0 = …  
marker1 = …

This is my code:

myvars = new LoadVars();  
myvars.load(“map.txt”);  
myvars.onLoad = function( ){  
trace(myvars.total);  
for (var i=0; i \< myvars.total; i++)  
{  
trace(“myvars.marker”+i);  
trace(“fff”);  
i++;  
}

I can’t even get the values for Marker… anyhelp is appreciated.

thanks,  
Kim

Contents of Map.txt  
&total=4&marker0=Marker0&title0=&description0=this is a long description with \<b\>HTML \</a\> and \<a href=“[http://www.google.com](http://www.google.com)”\>other stuff\</a\>&zip0=33133&marker1=Marker1&title1=&description1=this is a long description with \<b\>HTML \</a\> and \<a href=“[http://www.google.com](http://www.google.com)”\>other stuff\</a\>&zip1=10011&marker2=Marker2&title2=&description2=this is a long description with \<b\>HTML \</a\> and \<a href=“[http://www.google.com](http://www.google.com)”\>other stuff\</a\>&zip2=67423&marker3=Marker2&title3=&description3=this is a long description with \<b\>HTML \</a\> and \<a href=“[http://www.google.com](http://www.google.com)”\>other stuff\</a\>&zip4=10016
