<!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">We are not adding 'a ton' of extra stuff, but in
some cases it's the only practical way to get things done (especially
outputting data in JSON format).<br>
<br>
It doesn't matter really if there is an extra param and var in the html
output, except that it looks messy, especially as the output contains
the text of the method, so it could be quite long, as in:<br>
</font>
<pre style="white-space: -moz-pre-wrap;"><embed type="application/x-shockwave-flash" src="/output/charts.swf" id="Flash Object" name="Flash Object" bgcolor="#6666aa" quality="high" tojsonstring="function () { return s.object(this);}
" flashvars="xml_source=sample.xml&library_path=/output/charts_library&toJSONString=function () { return s.object(this);}
" height="300" width="400"></pre>
<font face="Verdana">We are talking very, very minor irritation here.
But I feel it would lend an extra elegance, at a very low cost, to an
already great product.<br>
<br>
Best regards,<br>
<br>
Olivier <br>
</font><br>
Geoff Stearns wrote:
<blockquote cite="midEFB7ED82-4478-4BD6-8881-8F5BFF7A6284@deconcept.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=US-ASCII">
i guess i never saw that as a problem... unless you are adding a ton of
extra stuff to the native js object (which should be frowned upon
anyway) it should be fine.
<div><br>
</div>
<div>does it really matter if you have an extra empty var in the root
of your flash movie?</div>
<div><br>
</div>
<div><br>
<div>
<div>On Oct 21, 2006, at 3:07 AM, Olivier Pichon wrote:</div>
<br>
<blockquote type="cite"> 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>
<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>
Same for the 2 portions of code in getSWFHTML() that write the params.<br>
<br>
Best regards,<br>
<br>
Olivier
<div>_______________________________________________</div>
<div>SWFObject mailing list</div>
<div><a href="mailto:SWFObject@lists.deconcept.com">SWFObject@lists.deconcept.com</a></div>
<div><a
href="http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com">http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com</a></div>
</blockquote>
</div>
<br>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
SWFObject mailing list
<a class="moz-txt-link-abbreviated" href="mailto:SWFObject@lists.deconcept.com">SWFObject@lists.deconcept.com</a>
<a class="moz-txt-link-freetext" href="http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com">http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com</a>
</pre>
</blockquote>
</body>
</html>