# Passing Variable to SWF in popup window

**URL:** <https://forum.kirupa.com/t/passing-variable-to-swf-in-popup-window/201005>\
**Category:** flash\
**Created:** [September 17, 2006, 5:28pm UTC](https://forum.kirupa.com/t/passing-variable-to-swf-in-popup-window/201005 "2006-09-17T17:28:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nycbrian](https://avatars.discourse-cdn.com/v4/letter/n/a87d85/32.png) [@nycbrian](https://forum.kirupa.com/u/nycbrian)\
**Post date:** [September 17, 2006, 5:28pm UTC](https://forum.kirupa.com/t/passing-variable-to-swf-in-popup-window/201005/1 "2006-09-17T17:28:14Z")

</div>

Hey all,

I am having trouble figuring out how to pass variable to an separate SWF in a new window I am popping-up. Here is the scenario.

I have a flash page with 4 buttons that each should popup a new window that contains a photogallery(gallery.swf). Right now I have it hardcoded in the gallery.swf movie to look at an xml file (gallery1.xml) to load the pictures.

I would like each button when pressed to pop open the window with the gallery.swf and pass an argument to the photogallery pointing it to the correct xml file.

So…

Button 1 would direct the gallery.swf to load (“gallery1.xml”)  
Button 2 would direct the gallery.swf to load (“gallery2.xml”)  
Button 3 would direct the gallery.swf to load (“gallery3.xml”)  
Button 4 would direct the gallery.swf to load (“gallery4.xml”)

How can I accomplish this?
