How to pass variable to main swf to his child

I want to do something simple.

I’ll have a xml with thumnail and XMLlink.

When we click on a thumbnail (which each thumbnail has his own XMLlink variable) in the mains swf: it load a new swf.

This new swf take the variable from the thumbnail and load the xml.

So instead of haveing lot of swf I have only 2…

How do I do that

thx in advance