# AS3: How to Call Multiple FlashVars Values From Actionscript? Help!

**URL:** <https://forum.kirupa.com/t/as3-how-to-call-multiple-flashvars-values-from-actionscript-help/284591>\
**Category:** flash\
**Created:** [March 20, 2009, 3:41pm UTC](https://forum.kirupa.com/t/as3-how-to-call-multiple-flashvars-values-from-actionscript-help/284591 "2009-03-20T15:41:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rooterman42](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@rooterman42](https://forum.kirupa.com/u/rooterman42)\
**Post date:** [March 20, 2009, 3:41pm UTC](https://forum.kirupa.com/t/as3-how-to-call-multiple-flashvars-values-from-actionscript-help/284591/1 "2009-03-20T15:41:47Z")

</div>

Hi,

I’m new to FlashVars usage, and have a simple question but having a hard time finding the answer:\*\*

In HTML:\*\*

\<object id=“myId” classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” width=“100%” height=“410”\>  
\<param name=“movie” value=“swf/navbar.swf” /\>  
\<param name=“wmode” value=“transparent” /\>  
\<param name=“FlashVars” value=“location=home&xmlPath=…/xml/content.xml”\>  
\<!–[if !IE]\>–\>  
\<object type=“application/x-shockwave-flash” data=“swf/navbar.swf” width=“100%” height=“410” wmode=“transparent” FlashVars=“location=extras-programs”\>

**In Actionscript, but currently only calling one value. I need to now retrieve BOTH values separately. How do I rewrite my code below to call each value individually? In other words, the values “location=home” and “xmlPath=…/xml/content.xml”?\*\*\*\*:**

//FLASHVARS CODE

//  
var varName:String;  
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;  
for (varName in paramObj) {  
myFlashVar = String(paramObj[varName]);  
}  
//INIT VARIABLES  
var myFlashVar:String;  
var myTextField:TextField;

//TEXTFIELD PROPERTIES  
//myTextField = new TextField();  
[//myTextField.text](https://myTextField.text) = myFlashVar;  
[//myTextField.x](https://myTextField.x) = 100;  
[//myTextField.y](https://myTextField.y) = 350;  
//addChild(myTextField);

//  
function locations\_loading():void {  
if (myFlashVar == “home”) {  
gotoAndStop(“main\_frame”);  
}  
}

locations\_loading();

\*\*Thanks!

r\*\*
