# Flashvars Purgatory

**URL:** <https://forum.kirupa.com/t/flashvars-purgatory/42695>\
**Category:** Uncategorized\
**Created:** [February 11, 2004, 11:44pm UTC](https://forum.kirupa.com/t/flashvars-purgatory/42695 "2004-02-11T23:44:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raydred](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/raydred/32/65_2.png) [@Raydred](https://forum.kirupa.com/u/Raydred)\
**Post date:** [February 11, 2004, 11:44pm UTC](https://forum.kirupa.com/t/flashvars-purgatory/42695/1 "2004-02-11T23:44:55Z")

</div>

Hey Guys…

Ive been hitting my head against the wall all day on this issue… (and im starting to bleed…)

I need to be able to pass a variable from the Html page itself , to the Flash movie on that page… using the \< PARAMETER NAME=“FlashVars” Value=“myName=Darrel”\> tag in html.

I tried searing thru macromedia, and this forum looking for examples that work but have failed. (please dont give me the link to macromedia i know that link too well) …

I just need help…

Im using Flash MX (not 2004) and flash player 6…

Is this possible? or am i just wasting my time on an impossible task.

And if it is possible, can you send me an example that has a html page and a flash movie with the action script so i can assimulate the code?

Much advanced Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 12, 2004, 12:20am UTC](https://forum.kirupa.com/t/flashvars-purgatory/42695/2 "2004-02-12T00:20:07Z")

</div>

it will probably be easier to use a url variable

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 12, 2004, 4:18am UTC](https://forum.kirupa.com/t/flashvars-purgatory/42695/3 "2004-02-12T04:18:12Z")

</div>

I cant get that to work either, but because of the way this is built, i need to get the variable thru flashvars.

Nobody else has any clue?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 12, 2004, 5:01am UTC](https://forum.kirupa.com/t/flashvars-purgatory/42695/4 "2004-02-12T05:01:49Z")

</div>

Ok i got it to work…

And for those out there who are having the same problem as me… Heres what i didnt do…

I didnt find this bit of important information on macromedia’s site… hehe =)

Heres what you do, on your html page you put this tag where the other param tags go.:

[AS]  
\< PARAM NAME=FLASHVARS VALUE=“myName=raydred”\>  
[/AS]

and you have to add this to inside the Embed object… ex:  
[AS]  
\<EMBED src=“myMovie.swf” quality=high … … FLASHVARS=“myName=raydred” \>  
[/AS]

Once that happens, it is automatically propagated to your flash movie on that page when it loads.

Now to access your variables use the \_level0 … ex:  
[AS]  
\_level0.myName;  
[/AS]  
so now i can use my name in flash…

Also you can define mutliple vars by using the & in the flasvars value, ex:

flashvars = “myVar1=val1&myVar2=val2&myVar3=val3”

browsers can support up to 64KB (65535 bytes) in length.

So There is my Tute, and it works. And i finally figured it out =)

Thanks for your help guys =)
