embed flash in HTML / AC_RunActiveContent

in order to embed a flash (swf) animation in a HTML page i use AC_RunActiveContent.js

you can download it from here (it’s a very old file that i’ve been using for years – not sure where i got it from and where to get a new version from 😀 – didn’t need one so far). just right-click on the link and choose save link as (chrome)

upload it to your server

in the head section include this line:

then include this piece of code where you want to show the animation

  • filename is name of the animation file without the .swf extension; you need to change this in 3 places
  • path_to is the path to the file relative to public_html
  • the width and the height are the numbers right after ‘width’ and ‘height’

hide an empty div in google DFP

whenever a Google DFP (DoubleClick for Publishers) ad doesn’t deliver a banner (i.e. not enough inventory, not in the geographic location that you set up) you’ll have an empty blank space instead

to avoid this you’ll have to make a little change in the code

in the first piece of code, the one placed in head, insert this line