# Variables passed thru HTML

**URL:** <https://forum.kirupa.com/t/variables-passed-thru-html/187104>\
**Category:** Uncategorized\
**Created:** [April 26, 2006, 6:11pm UTC](https://forum.kirupa.com/t/variables-passed-thru-html/187104 "2006-04-26T18:11:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pomme\_](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Pomme\_](https://forum.kirupa.com/u/Pomme_)\
**Post date:** [April 26, 2006, 6:11pm UTC](https://forum.kirupa.com/t/variables-passed-thru-html/187104/1 "2006-04-26T18:11:03Z")

</div>

ok, here’s another mind-boggler.

I have an HTML page that passes a variable, the easy way.  
This is the HTML generated by Flash, to which I’ve added the part in \*\*bold \*\*(that is, P1=BARTHEZ, thus passing the variable P1 to flash, whose value is BARTHEZ

```auto

 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>FOOTBALL TEAM SELECTION</title>
</head>
<body bgcolor="#ffffff">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="960" height="570" id="football_13" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="football_13.swf **?P1=BARTHEZ**" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="football_13.swf **?P1=BARTHEZ**" quality="high" bgcolor="#ffffff" width="960" height="570" name="football_13" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>

```

In my flash movie, I have a text field named “player”.  
In my code, I have

```auto

_root.player.text = P1

```

When I launch the HTML page, the field is correctly filled with “BARTHEZ” in my flash movie.  
Now…

if I code

```auto

_root.player.text = P1
if (P1 == undefined){
     _root.gotoAndStop(3)
}
else _root.gotoAndStop(4)

```

it should work just fine, but I always get to frame 3, even when the player.text displays “BARTHEZ”

Any help or hint would be greatly appreciated…
