How to load XML to SWF on each node? Here is my problem: I have 2 SWF files for a crossword puzzle: first one is for creating puzzles and outputting XML files upon clicking the "Save" button and second SWF is displaying those puzzles to the users by listing and loading those XML files and upon clicking it loads the selected XML file into SWF. This is okay so far here. But I need to use web interface so that a user inside a website sees those XML list on the web page and upon clicking/selecting, the second SWF will load with the related XML file. I need this because I will organize those XML files with some modules inside drupal such as Organic Groups. So each user will see different lists of XML files. For example, I have 2 groups created with my organic groups module inside drupal, each group has a different editor. So those editors will create puzzles and will set them for their groups with Organic groups module.

After some research I think I figured a possible and reasonable way to achieve this with a help of a friend. So, to wrap up things so far;

-I have a puzzle maker swf and a puzzle player swf.
-Puzzle maker actually generates some xml files that could be played by Puzzle player(swf).
-These xml files are to be stored in Drupal.
-The stored xml files behaviour is same as Organic groups behaviour. Where the files belonging to a particular group is accessible to the group members.

So the idea of implementation is here,

1.) A custom page for creating puzzle using Puzzle maker(swf). A "Puzzle Data" content-type to hold the xml files. This node is under organic groups.

2.) The editors creates puzzle (things okay so far here) and the xml file will be downloaded to editor's computer.

3.) Now the editor may upload the xml file and attach it to "Puzzle Data" node.

4.) Now I may create a view to display all the "Puzzle Data" nodes in a Organic Group with Views module.

5.) Now comes the tricky part. The actual node display should be a Puzzle Player(swf) that uses the "xml" file uploaded to the node.

After some research I may achieve this either Creating a custom node template or creating a custom field formatter. So here I need a bit help with the php codes part so that each node will post/sent the attached xml file to puzzle player(swf) attached to the node.

(Btw this 2 step: downloading xml and later uploading it to a node is something unwanted, maybe puzzle maker(swf) can be embedded inside node/add path for Puzzle Data content type and editors may download xml so will upload it again into the field on the same page. )
You would create a new node.tpl.php by copying the existing one from your theme or from the node module (part of core).  Rename your copy node--mycontenttype.tpl.php and place it in your theme directory (along side your other .tpl files).

Install devel and use dpm() to explore the $content variable.  Hide the XML field and extract it's file id (fid) and pass it to file_load.  This should return an object containing your file path, again use dpm() to explore this array and get your file.

https://api.drupal.org/api/drupal/includes%21file.inc/function/file_load/7

Embed your .swf directly into your new node.tpl.php and pass the XML to it as you would any other Flash argument.