OPfewnojnolfew / swfobject

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

Flash object methods call fail on Firefox (dynamic) #576

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Embed a flash movie using dynamic approach
2. Get the flash object using document.getElementById
3. Call a flash method such as myFlashObject.Play()
4. Firefox will throw a is not a function exception.

What is the expected output? What do you see instead?
The flash object methods should work.

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

Please provide any additional information below.
This works fine on IE. I did notice that when using the static approach this 
works on both browsers. Checking the generated HTML code by the dynamic 
approach i realized that it doesn't add the nested html 'object' element inside 
the flash 'object' element as the static approach suggests on the 
documentation. See attached file to make it clear.

Original issue reported on code.google.com by sergio...@gmail.com on 15 Jul 2011 at 2:21

Attachments:

GoogleCodeExporter commented 9 years ago
This is not a bug, but an authoring error / misunderstanding of how things work.

Please post authoring questions to the mailing list before submitting a "bug".

With static markup, you are defining use cases for both IE and non IE browsers 
(and only one <object> will be used based on the conditional logic). With 
dynamic embed, browser detection is used, and only the singular required 
<object> will be rendered to the page.

In order to call methods such as myFlashObject.Play(), make sure you set the id 
and name property in the attributes object so that the object can be found and 
referenced with document.getElementById() etc.

See examples in the test suite for working examples, such as: 
http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_dynamic_com.html

I am closing this as invalid.

Original comment by aran.rhee@gmail.com on 15 Jul 2011 at 4:33