Hi,
Ive been looking at this for hours and I cant seem to find the bug in my coding :(. Could someone please take a look? Essentially this switch statement decides on whats passed to the preloader function “showLoading”. My “nothing test case” works (obviously), and i get the following output from the “nothing test case” trace:
[AS]
nothing test case
this.xmlFile: 28, this.contentUrl: 4, this.targetClip: 5
[/AS]
switch(this.xmlFile, this.contentUrl, this.targetClip){
case (this.xmlFile.length>3 && this.contentUrl.length>0 && this.targetClip.length>0):
trace("case 1");
//begin load movie
eval(this.targetClip).loadMovie(this.contenttUrl);
//create XML obj and load xml file
this.xmlData=new XML();
this.xmlData.ignoreWhite=true;
this.xmlData.load(this.xmlFile);
//start preloader
this.loadComplete = setInterval(this, "showLoading", 50, this.targetClip, this.xmlFile);
break;
case (this.xmlFile.length<=3 && this.contentUrl.length>0 && this.targetClip.length>0):
trace("case 2");
eval(this.targetClip).loadMovie(this.contenttUrl);
this.loadComplete = setInterval(this, "showLoading", 50, this.targetClip);
break;
case (this.xmlFile.length>3 && this.contentUrl.length<1 && this.targetClip.length<1):
trace("case 3");
this.xmlData=new XML();
this.xmlData.ignoreWhite=true;
this.xmlData.load(this.xmlFile);
this.loadComplete = setInterval(this, "showLoading", 50, this.xmlData);
break;
case(this.xmlFile, this.contentUrl, this.targetClip):
trace("nothing test case");
trace("this.xmlFile: "+this.xmlFile.length +", "+"this.contentUrl: "+this.contentUrl.length+", "+"this.targetClip: "+this.targetClip.length);
break;
default:
trace("Error: cannot continue, no content to load")
break;
}