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”>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”>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”>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”>other stuff</a>&zip4=10016