hiimnalaa / swfobject

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

Documentation for callbackFn is incorrect #597

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use embedSWF to attempt to embed a SWF, and include a callbackFn
2. Ensure that the SWF you are trying to embed does not actually exist
3. Check the e.success variable in callbackFn

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

Expected output is false.  Instead, e.success is true, even though the SWF was 
not able to be downloaded.

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

2.2 on Windows 7 professional, but I understand this problem is systemic.

Please provide any additional information below.

According to this thread:
http://groups.google.com/group/swfobject/browse_thread/thread/f754ac410e5fa9e8/c
a7fb50837da40dc?lnk=gst&q=callbackFn+success

The callbackFn is working as intended, despite what the documentation says.  
Apparently the current docs are based on a technical interpretation of what 
constitutes successfully embedding a SWF.  Instead of relying on a subtle and 
technical internal definition for "embedded," the docs should be updated so 
that developers can understand the first time they read them.

Suppose you did a survey of Flash developers and asked them "You are using 
SWFObject to put a SWF on a page, and a user visits the page. For that user, 
the SWF fails to download successfully.  Has the SWF been embedded successfully 
or not?"  What do you think the consensus would be?

Obviously it would be "no, it was unsuccessful."  Think about the plain sense 
of the phrase "embedded successfully."  It's not successful if it doesn't 
download!  To say otherwise would be like saying a car runs successfully 
because the starter motor turns over--even if the engine itself won't start.

The documentation should be written so that it is clear and plain, and not 
depend on readers being aware of technical subtleties like "the SWF file can be 
blocked or missing but we will still consider it embedded successfully because 
that's how we define 'embedded'."

If the best we can do in the callback function is report if the min Flash 
player is available and that the <object> dom element for the SWF was created, 
that's what the docs should say.

Original issue reported on code.google.com by joshbe...@gmail.com on 26 Oct 2011 at 1:44

GoogleCodeExporter commented 9 years ago
Aran just reported that he's already updated the docs.

Thanks, Aran!

Original comment by joshbe...@gmail.com on 26 Oct 2011 at 2:46

GoogleCodeExporter commented 9 years ago

Original comment by aran.rhee@gmail.com on 26 Oct 2011 at 3:09