SWFobject replaces content with the markup (the "object/embed" tags), but 
doesn't use document.write(). So, you could easily do what you are hoping 
with just simply having some kind of content inside your target div (like an 
empty span or something) that you simply tell SWFObject to replace with the 
SWF markup. NOTE: If you specify the actual container div for replacement, 
it'll literally replace that DOM element (your div) with the object/embed, 
so you may want to have it replace inner content of some sort.

Moreover, SWFObject does this because of the "best practice" of having 
alternate content. We recommend to people that you have some sort of 
alternate content or messaging (images, text, ec), which you replace with 
the SWF markup, that shows a friendly message to a person who doesn't have 
flash/javascript. The alternate content shows if for some reason the SWF 
cannot show, and it provides a smoother "graceful degradation" (or 
"progressive enhancement" depending on how you look at it) for the 
flash-lacking crowd.

--Kyle




--------------------------------------------------
From: "MPS" <[email protected]>
Sent: Tuesday, March 10, 2009 2:30 PM
To: "SWFObject" <[email protected]>
Subject: SWFObject and innerHTML

>
> Can SWFObject be used in the following way:
>
> I want to use javascript to generate my <object/embed> tag HTML and
> populate a <div> with the result.
>
> I tried modifying Adobe's AC_Generateobj function to do this, and it
> works fine in Firefox and Safari, but not in IE (6 or 7).
>
> Here's my code:
>
> var flashObjTag = AC_FL_RunContent(... the usual args here...);
> $(divName).innerHTML = flashObjTag;
>
> Basically we're trying to avoid using document.write().
>
> Unfortunately I'm running into this bug:
>
> http://bugs.adobe.com/jira/browse/FP-692 (ExternalInterface.call()
> fails in IE7 with "Object Does not support this property or method")
>
> Will SWFObject provide a solution for me?
> >
> 

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