I have never used flashVars, even in AS2, but the project I’m working on requires that I use since my client is going to use dynamic urls defined as expressions and he wants to have control without having to edit a fla file. I have read a lot of tutorials and can’t seem to come up with a solution. Basically what I want is to load my Flashvars defined in swfObject, each one holding an expression, for example:
<script type="text/javascript">
**var flashvars = {
rutaMEX:"mainContainer.aspx?Country=pkbE5eknzMLhWZ5x+K3/tA=="
};**
var params = {};
params.menu = "false";
params.quality = "high";
params.scale = "noscale"
params.wmode = "transparent";
params.seamlesstabbing = "true";
params.allowfullscreen = "true";
var attributes = {};
attributes.id = "main";
attributes.name = "main";
swfobject.embedSWF("swf/landing.swf", "altContent", "100%", "100%", "10.0.2", "Scripts/expressInstall.swf", flashvars, params, attributes);
</script>
Right now, I have just one value pair, but I will add them as they become available. I have 11 movieclip buttons which will take you to a url defined by it’s corresponding flashvar. If I was doing this is AS2, I would just add this action to the button:
button0.onRelease = function() {
getURL(rutaMEX);, "");
}
How will I accomplish the same thing in as3? I know you have to get flashVars using .loaderInfo but that as far as i got.
Any help will be greatly appreciated