I was playing around with the idea of passing data from an HTML page
directly into a Flash movie via Javascript/SWFObject. One thing I wanted
to try was sending the text that SWFObject replaces into the Flash
movie.
In Firefox this was pretty simple. E.g., if SWFObject was replacing the
contents of <div id="flash-content">...</div>, then all that was needed
was something in the Javascript code like:
var swfObj = new SWFObject(parameters);
swfObj.addVariable("HTML_flashContent", escape('<div
id="flash-content">' +
document.getElementById("flash-content").innerHTML.toString() +
"</div>"));
Then, in Flash, the root variable HTML_flashContent can be parsed into
an XML object. This has obvious benefits for search engine optimization,
as well as making it so a Flash and non-Flash version of a page can be
the exact same file.
Unfortunately, though, Internet Explorer and Safari return SGML, not
XHTML, for the innerHTML property (e.g., the above div tag gets
converted to <DIV id=flash-content>...</DIV> in IE). I made a
quick-and-dirty SGML to XHTML conversion tool to get around this, and it
seems to work so far.
My question is, has anybody else made an SGML to XHTML conversion tool
in ActionScript, or should I continue to refine mine and offer it for
public use when done?
―
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Ave. Ste. B
Los Angeles, California 90039
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com