Hmm im not sure what's happening here because I've never used that method for inserting flash in SS as yet.
For what it's worth I would usually handle all my flash work in the template but if it must be dynamic then I set up the flash embedding code in the template and use a CMS field to pass on the URL of the SWF.
So in the page definition file I might create a field called SWFLocation and add it to the CMS fields:
public static $db = array(
'SWFLocation' => 'Text'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new TextField('SWFLocation'), 'Content');
return $fields;
}
Then in your template for that page you can set the path in your flash embed code to something like:
http://www.yoursite.com/assets/$SWFLocation
This way all you have to do is add the name of the file in the CMS field. Hope this helps a bit.