[SWFObject] Insert contents of div into Flash
Ben Huson
ben at thewhiteroom.net
Wed Aug 16 00:51:55 PDT 2006
I think I read something about this in a previous post but couldn't
find it.
It should be possible to write the contents of a div into a Flash
movie as a Flashvar like this:
so.addVariable("varname", escape(document.getElementById
('divtag').innerHTML));
In my tests, my XHTML formatted images tags <img src="file.jpg" />
seem to be stripped of their trailing "/" when they arrive in Flash.
This is annoying as what I would like is to get some nice XML like this:
<img src="file.jpg" />
<img src="file.jpg" />
<img src="file.jpg" />
Because the slash has gone, Flash treats them as nested tags like this:
<img src="file.jpg">
<img src="file.jpg">
<img src="file.jpg">
</img>
</img>
</img>
Any ideas?
Also, is there a limit to the amount of text that can be loaded as a
Flashvar.
- - -
Ben Huson
M: 07974 744796
E: ben at thewhiteroom.net
W: www.benhuson.com
More information about the Swfobject
mailing list