IndiePaivaGame / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

Documentation error with order of variables in dynamic publishing #193

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Follow documentation and embed dynamically using the following code:

swfobject.embedSWF("myContent.swf", "myContent", "300", "120",
"9.0.0","expressInstall.swf", flashvars, params, attributes);

2. When code is executed params will now be posted into flashvars

What is the expected output? What do you see instead?

params should be posted into params, flashvars into flashvars etc.  When I
rearrange the order as follows:

swfobject.embedSWF("swf/bill_ani.swf", "flash", "400", "390", "7.0.0",
attributes, flashvars, params);

It all works except for the attributes.  There does not seem to be a way to
get the attributes to work.

What version of the product are you using? On what operating system?

swf_object 2.1

Please provide any additional information below.

Original issue reported on code.google.com by stephenc...@gmail.com on 13 Oct 2008 at 4:11

GoogleCodeExporter commented 9 years ago
No, it's not a documentation error and everything works fine, incl attributes, 
I just
wonder why you think that rearranging is a solution...

For authoring issues (which this is), please consult the discussion group: 
http://groups.google.com/group/swfobject

Original comment by bobbyvandersluis on 13 Oct 2008 at 9:40

GoogleCodeExporter commented 9 years ago
My thinking, not that I am much of a javascript man, was that like in 
ActionScript or
PHP, the function is looking for variables coming in in a certain order.

Anyway, my experience is when I write my code like this:
===============================================
<script type="text/javascript">
var flashvars = {};
flashvars.name1 = "";
flashvars.name2 = "";
flashvars.name3 = "";

var params = {};
params.menu = "false";
params.wmode = "transparent"

var attributes = {};
attributes.id = "theFlash";
attributes.name = "theFlash";

swfobject.embedSWF("swf/loader.swf", "flash", "400", "390", "7.0.0", flashvars,
params, attributes);
</script>
===============================================
I get the following result which is obviously wrong seeing as the params are 
now a
value of the flashvars.
===============================================
<object id="flash" width="400" height="390" type="application/x-shockwave-flash"
data="swf/loader.swf" style="visibility: visible;">
<param name="id" value="theFlash"/>
<param name="name" value="theFlash"/>
<param name="flashvars" value="menu=false&wmode=transparent"/>
</object>
===============================================
When I write the embed call like this:

===============================================
swfobject.embedSWF("swf/loader.swf", "flash", "400", "390", "7.0.0", attributes,
flashvars, params);
===============================================
I get a better result because my wmode and menu settings are now correctly 
written:

===============================================
<object id="flash" width="400" height="390" type="application/x-shockwave-flash"
data="swf/loader.swf" style="visibility: visible;">
<param name="menu" value="false"/>
<param name="wmode" value="transparent"/>
<param name="flashvars" value="name1=&name2=&name3="/>
</object>
===============================================

Take it or leave it, all I was doing was reporting something I could reproduce 
and
appeared to simply be a documentation error.

Original comment by stephenc...@gmail.com on 13 Oct 2008 at 10:11