Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Strange HTML rendering with embedded Flash

The html below is typical of what Swish generates to embed a Flash movie in your page :

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0"
  id="KenyaKonnect" width="110" height="15">
  <param name="movie" value="PTMFOG0000000339.swf">
  <param name="quality" value="high">
  <param name="bgcolor" value="{$.color_back$}">
  <embed name="KenyaKonnect" src="PTMFOG0000000339.swf" quality="high" bgcolor="{$.color_back$}"
    width="110" height="15"
    type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
  </embed>
</object>

If you past this into an article in HTML view, you get strange effects.

First, you can't switch to normal view any more - presumably because the renderer can't handle the flash. This is annoying, but not a big problem. It would be better if it just gave you a blank space of the apptopriate size.

Second, in HTML view an extra blank line appears before "pluginspage". It's _not there_ in the file, it's put in by the HTML renderer. Weird ... the colour coding is a bit odd, too.

It publishes OK and the movie works, but this does feel a little fragile. This is all in 2.03 beta.

Incidentally I highly recommend Swish if you want to add some Flash effects to your site, but don't want to shell out for Dreamweaver.

Michael Wild
Friday, May 23, 2003

On further investigation, this seems to be a side-effect of word-wrapping if you have a "word" longer than the window width at the beginning of the line. It tries to break the line before the first word that won't fit, which in this pathological case ends up inserting a blank line.

So it's nothing to do with Flash.

Doh!

Michael Wild
Friday, May 23, 2003

Don't forget Word Wrapping can be turned off (and probably should when you're working with complicated HTML)

Joel Spolsky
Tuesday, May 27, 2003

*  Recent Topics

*  Fog Creek Home