Does it need to be .htm file?
If not, the absolute easiest way to deal with it is to modify the flexpaper.htm and name it flexpaper.php. Then simply modify the swffile to be:
'docs/<?php echo (int)@$_GET['swf'];?>.swf', and then when you call it you would use flexpaper.php?swf=4 for example.
header('HTTP/1.1 420 Enhance Your Calm');