Closed (fixed)
Project:
SWF Embed
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2009 at 21:06 UTC
Updated:
14 Dec 2009 at 19:40 UTC
If I used
foreach($element['#flashvars'] as $parameter => $value) {
$swf->flashVar($parameter, $value);
}
then the flashvars don't get passed to the movie.
But if I assign an array of flashvars in the parameters
$swf->param('flashvars', $element['#flashvars']);
it works.
I'm not very good with jQuery, but I added a few alert boxes and the function to flatten the flashvars to a string is working, but the value doesn't seem to be processed when the parameters array is processed.
Comments
Comment #1
Stuart Greenfield commentedIf I manually force the flashvars in by adding some code just after ie6hack=''; then it works ok.
Comment #2
Stuart Greenfield commentedAh - this occurs ONLY if no other parameters are set on the movie. If I pass no other parameters, the flashvars are missing, but if I pass, say, 'play' => 'true' then the flashvars work. It looks like when the settings are constructed and there are no parameters then opts.params turns in to an empty string.
Adding
just before
seems to cure it.
Comment #3
mbutcher commentedWill this work instead?
(jquery.swfembed.js: 86)
This should correctly initialize the params object.
Comment #4
Stuart Greenfield commentedYes - that seems to work!
Comment #5
mbutcher commentedThis will be in the dev build in the next 12 hours. It is available now in CVS.
Thanks for the patch!
Comment #6
Stuart Greenfield commentedIt still didn't work on a new install - putting the
back in fixed it again. I think on my previous test I was loading cached content.
Also, the fix has to go earlier in the code (I'm putting it at line 71) as IE tries to add to the params array too, so it gets hit with the same bug.
I've also noticed that on IE the page continuously shows itself as loading, even when the content appears. FF is fine though. Not sure why that is?
Comment #7
mbutcher commentedAlright. Thanks. I'll re-fix (perhaps later today) with your original change.
Matt
Comment #8
mbutcher commented