so what you are saying is correct in that the "success" swfobject is
measuring if the minimum flash player was available and if the <object> dom
element which was made for the swf was actually created and available. As
far as successful embedding goes, this is all that is required.

If you pass in a bad replacement dom id, or the flash player isn't matched,
then you will get a false back.

You cannot use the callback function boolean to check if you Flash file was
actually loaded (there is no client-side way of checking if the url to your
swf is a valid one AFAIK).


Aran



On Fri, Oct 22, 2010 at 5:31 PM, flatpick13 <[email protected]> wrote:

> 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]<swfobject%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/swfobject?hl=en.
>
>

-- 
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