# Use AS3 to get values from query string on browsers URL

**URL:** <https://forum.kirupa.com/t/use-as3-to-get-values-from-query-string-on-browsers-url/297915>\
**Category:** Uncategorized\
**Created:** [October 10, 2009, 6:43am UTC](https://forum.kirupa.com/t/use-as3-to-get-values-from-query-string-on-browsers-url/297915 "2009-10-10T06:43:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quicksmack](https://avatars.discourse-cdn.com/v4/letter/q/fbc32d/32.png) [@quicksmack](https://forum.kirupa.com/u/quicksmack)\
**Post date:** [October 10, 2009, 6:43am UTC](https://forum.kirupa.com/t/use-as3-to-get-values-from-query-string-on-browsers-url/297915/1 "2009-10-10T06:43:40Z")

</div>

ok… i am trying to tell flash to put some text on a dynamic textfield on stage based on some variables written on the URL in the browsers address bar, sort of like how PHP uses $\_GET…

so for example, i have a file called “embed\_page.php” and embedded in it is a swf file called “dynamic.swf”

if i type on the addressbar “[www.domaingoeshere.com/embed\_page.php?n=HomerSimpson&c=Orange&g=Male](http://www.domaingoeshere.com/embed_page.php?n=HomerSimpson&c=Orange&g=Male)”, how would i now go about getting those values to the swf?

i could imagine writing some kind of code like:

```auto
trace("name is: " + n + " and color of choice is: " + c + " and gender is: " + g);

```

if only i could get access to the URL in the address bar, i could play around with indexOf and slice to get the values i want…
