I ran into an issue today with SWFObject and thought I would post this
in hopes it might help someone else in the future.  I'm a newbie in
this group so I hope this is posted OK. :)

I was debugging a problem with swf loading issues and noticed that the
function parms for swfobject in our js did not use the callbackFn for
embedswf.

The doc says:
"callbackFn (JavaScript function, optional) can be used to define a
callback function that is called on both success or failure of
embedding a SWF file "

so I thought great!  I can use this to tell if my swf has
suvccessfully loaded or not. But I was always getting back TRUE no
matter whether I gave it a real swf file name or one that didn't
exist.  I debugged the embedswf function and found that my confirm()
below was popping every time:

                                        if (hasPlayerVersion(swfVersionStr)) { 
// create SWF

                                                var obj = createSWF(att, par, 
replaceElemIdStr);

                                                if (att.id == replaceElemIdStr) 
{
                                                        
setVisibility(replaceElemIdStr, true);
                                                }

                                                        
confirm("hasPlayerVersion");

                                                callbackObj.success = true;
                                                callbackObj.ref = obj;
                                        }

Therefore it seems like the description in the doc is misleading. It
doesn't really tell us the "success or failure of embedding a SWF
file" - it only tell us the result of the two steps above.

I;m not sure what the most accurate description would be but the
current description sure had me foooled for a while.

Thanks!






-- 
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.

Reply via email to