At the moment I am using a fixed variable
$articleID = 5;
var articleid = "<?php echo $articleID; ?>";
Then trying to us it within a string
"FlashVars", "fileURL=../uploadedfiles/+ articleid + .gpx&key=ABQIAAAAOQBC.........