# Switch / Case not working

**URL:** <https://forum.kirupa.com/t/switch-case-not-working/177507>\
**Category:** flash\
**Created:** [February 2, 2006, 3:00pm UTC](https://forum.kirupa.com/t/switch-case-not-working/177507 "2006-02-02T15:00:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodsem](https://avatars.discourse-cdn.com/v4/letter/r/57b2e6/32.png) [@rodsem](https://forum.kirupa.com/u/rodsem)\
**Post date:** [February 2, 2006, 3:00pm UTC](https://forum.kirupa.com/t/switch-case-not-working/177507/1 "2006-02-02T15:00:52Z")

</div>

I need someone who help me with this:

I’m trying to send some variables from a page to a Movie into a PHP page, that is in a different frame. The idea is to make the movie goes to an specifyc scene when it receive an specifyc variable. To do this I’m using the switch / case script:

```auto
stop();
switch (codigo) {
 case 1:
  gotoAndPlay("news", 1);
  break;
 case 2:
  gotoAndPlay("mailbox", 1);
  break;
 case 3:
  gotoAndPlay("music", 1);
  break;
}

```

The movie is in the file mainFrame.php, and it’s embed in this way:

```auto
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0)" width="597" height="356">
      <param name="movie" value="flash/Mundo02.swf" />
      <param name="quality" value="high" />
      <param name="menu" value="false" />
   <param name="codigo" value="<?= $_GET["codigo"] ?>" />
      <embed src="flash/Mundo02.swf" width="597" height="356" quality="high" pluginspage="[http://www.macromedia.com/go/getflashplayer](http://www.macromedia.com/go/getflashplayer)" type="application/x-shockwave-flash" menu="false" codigo="<?= $_GET["codigo"] ?>"></embed>
    </object>

```

And the page that send the variables is menu.htm, that have links like:

```auto
 
mainFrame.php?codigo=2

```

When I try this, the code **\<?= $\_GET[“codigo”] ?\>** on the mainFrame.php file is successfully replaced for the variable, but the flash movie don’t do anything.

What’s wrong with this. Can anybody help me.
