[fl8 as2] Got this code from a kirupa tut.. does it have errors?

[COLOR=black]I’ve been studying this code and it’s driving me nuts… can someone take a look and tell me if my assesment below is accurate? If I’m in error plz tell me how.[/COLOR]

[COLOR=black]First, the function requires 5 arguments however at the bottom only 4 are being passed to it… I thought that the order in which you list the parameters in your function call, corresponded to the order of the variables of the function declaration… in this example it appears as if the intent is for the parameter “l” to be a null value or undefined… but how can l be undefined if it’s being passed the value of “sites_txt” in the function call? Am I to asume that if there are not enough parameters supplied that the available parameters will be populated in the function’s list of arguments from right to left? Is that how this person expects to get an undefined value for l?[/COLOR]
Second, with the first use of the variable “n” in the line [COLOR=#000050]n[/COLOR].[COLOR=#0000d0]htmlText[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#666666]""[/COLOR];… wouldnt you have to use an eval() function as such- eval(n).htmlText = “”; ?

Third, the parameters “cycle” and “null” need to switch places in the function call right?

Fourth, and you dont need to but semicolons after closing curly braces right? see 2nd line above l.load(f);

probably why I’m so unsure is that the code isnt throwing any errors.

*sorry, I wrapped the code in “code” tags yet it still doesnt display right

here’s the link where you can see the code clearly
http://www.kirupa.com/developer/actionscript/flashphpxml_integration.htm
[COLOR=#006610][/COLOR]
[COLOR=#006610]Item on the stage:[/COLOR]
[COLOR=#006610]Dynamic text field- sites_txt[/COLOR]
[COLOR=#006610]
[/COLOR]

 function lv(l, n, t, e, f) { if (l == undefined) { l = new LoadVars(); l.onLoad = function() { var i; n.htmlText = ""; if (t == undefined) { n.htmlText += "<b>"+this["title"+e]+"</b><br>"; } else { for (i=0; i<this.n; i++) { n.htmlText += "<a href='"+this["link"+i]+"'>
"+this["title"+i]+"</a><br>"; } } }; } l.load(f); } lv(sites_txt, "cycle", null, "sites.php");