Resolved. I used SWF Object
For anyone who comes across the issue.
I was using
<object type="application/x-shockwave-flash" data="images/banner.swf" width="288" height="128">
<param name="movie" value="images/banner.swf" />
</object>
It would not work with vars and xml.
So I decided to use SWF Object
It will allow you to write SWF as javascript includes.