Awww snap! trouble with array and load movie

hi y’all… i’m trying to use an array to match up with a variable from an .asp page… that is, i want to load a particular .swf file based on that returned variable.

I’m not sure that loadMovie even supports this kind of tomfoolery… anybody out there who be’s smarter than me know?

var swfs2Load=new Array("sin.swf","flirt.swf","entertainment.swf","dizzyfunk.swf","aura.swf","privilege.swf","envy.swf");
function dayTest(){
  _root.maincontent_mc.loadMovie(swfs2Load[getData.day])
}
getData = new LoadVars();
getData.load("whatday.asp", getData, "GET");


hello,

try this:

var swfs2Load = new Array("sin.swf", "flirt.swf", "entertainment.swf", "dizzyfunk.swf", "aura.swf", "privilege.swf", "envy.swf");
getData = new LoadVars();
getData.load("whatday.asp", getData, "GET");
getData.onLoad = function(ok) {
 if (ok) {
  _root.maincontent_mc.loadMovie(swfs2Load[this.day]);
 } else {
  trace("error while trying to load from url");
 }
};

regards :slight_smile:

don’t have a clue why, but that didn’t work either! shoot! anybody got any ideas?