<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Verdana">Can I make a small suggestion:<br>
<br>
When looping through the params or variables to write them out to the
page (generating the html code), is it possible to check that the value
is not a function?<br>
<br>
We tend to use several js utilities that augment the Object class (we
use json.js, for instance, that adds the 'tojsonstring' to all
objects). However, the functions added to the Object class get output
as both a <param> tag and an an extra entry in the flashvars
attribute value when the SWF HTML code is generated.<br>
<br>
getVariablePairs could simply be rewritten as:<br>
</font>
<pre>getVariablePairs: function(){
var variablePairs = new Array();
var key;
var variables = this.getVariables();
for(key in variables){
var value = variables[key];
if ( typeof value != 'function')
variablePairs.push(key +"="+ value);
}
return variablePairs;</pre>
<font face="Verdana">Same for the 2 portions of code in getSWFHTML()
that write the params.<br>
<br>
Best regards,<br>
<br>
Olivier</font>
</body>
</html>