# Passing variables to flash

**URL:** <https://forum.kirupa.com/t/passing-variables-to-flash/294052>\
**Category:** flash\
**Created:** [August 7, 2009, 3:55pm UTC](https://forum.kirupa.com/t/passing-variables-to-flash/294052 "2009-08-07T15:55:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m\_u\_r](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@m\_u\_r](https://forum.kirupa.com/u/m_u_r)\
**Post date:** [August 7, 2009, 3:55pm UTC](https://forum.kirupa.com/t/passing-variables-to-flash/294052/1 "2009-08-07T15:55:30Z")

</div>

So, I read the tutorial about passing variables by changing the url of the .swf with the following code:

```auto
if (movie==1 or movie=="") {
   trace("default");
}
if (movie==2) {
   getURL("http://www.yahoo.com");
}

```

My question is, is there anything special if I want it to respond to the url of a .php page? So, if I have a page that ends in “?page\_id=2” could I do the same thing or does it have to be an .swf?

```auto
if (page_id==1 or page_id=="") {
   trace("default");
}
if (page_id==2) {
   gotoAndPlay("pageTwo");
}

```
