function callChart() {
// holds a bunch of other functions
function genFlashChart() {
var params=null;
// var flashvars=null;
var attributes = {};
attributes.data='chart-data.php?d=platform,1,2,3,4,5,6,0-
time,sixmo';
var flashvars = {};
flashvars.data=data;
swfobject.embedSWF("open-flash-chart.swf", "crapola3", "700",
"420", "9.0.0", "20swfobject/expressInstall.swf", flashvars);
}
genFlashChart();
}
Then I have prototype's equivalent of an onLoad function to run
callChart.
Well it fails *unless* I change the following code in embedSWF:
addDomLoadEvent(function() {
createSWF(att, par,
document.getElementById(replaceElemIdStr));
createCSS("#" + replaceElemIdStr,
"visibility:visible");
});
to this:
createSWF(att, par,
document.getElementById(replaceElemIdStr));
createCSS("#" + replaceElemIdStr,
"visibility:visible");
... Then it works. This is in FireFox 2.0 Windows, using SWFObject
with open-flash-charts
Any help as to how to avoid this kludge would be greatly appreciated.
I'm sure it's not going to work across platforms, for instance.
function genFlashChart(width, height, chartid) {
// width is the width of the obj, height is the height,
chartid is the id of the element you want to replace.
// set up your objects
var flashvars = {};
var att = {};
var par = {};
// load up flashvars with data you want to pass to your flash
script
flashvars.data=data;
att.data="open-flash-chart.swf"; // there's the swf file
you're loading
att.width=width;
att.height=height;
att.id=chartid;
att.type="application/x-shockwave-flash"; // re-running this
script via javascript will lose this value unless you have it here
par.flashvars='data='+data;
par.wmode='transparent'; // if you want html to display over
your flash
el=$(chartid); // prototype shortcut
swfobject.createSWF(att, par, el);
// and there.
}
I have some problems getting this to preload in exploder but once the
user clicks a javascript-enabled form element that talks to the
function it loads.
Unknown if it solves the original OS X problem that sent me on this
ride.
On Oct 16, 5:38 pm, troyvit <t...@sphere.com> wrote:
[snip]