Passing variables from HTML to Flash

Hello!
I am sure this topic is already discussed here but I really can’t find it.
So, what I wanna do is to manipulate my flash code through HTML.
My application should have two variants - with panel and without panel.
I want to tell Flash to make my panel visible only if there is “yes” parameter in the HTML code. I am doing it with FlashVars. I know there is way to make it so:
<embed src=“myMovie.swf?panel=yes”>.

Anyway, this is what i do in the HTML code:

<param name=FlashVars value=“addPanel=yes”>
<embed src=“myMovie.swf” name=“FlashVars” FlashVars = “yes” quality=“high” bgcolor="#ffffff" width=“500” height=“280” name=“FlashVars”

And now my actionscript:

this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);

function loaderComplete(e:Event):void{
var FlashVars=this.loaderInfo.parameters;
if(FlashVars.addPanel == “yes”){
panel.visible = true;
}else{
panel.visible = false;
}
}

When I start the application on a browser Flash makes no difference between “yes” and “no” parameter so I am doing it wrong. That’s my first time passing variables from html to flash and it’s a bit hard to understand. So any help would be appreciated :slight_smile: