So you are trying access strValue after your loop? It may be a scope issue, try casting the var before the loop and trace after the loop. Also, you may want to access your flash var one by one to help debug:
//quick example var strValue:String = LoaderInfo(this.root.loaderInfo).parameters.strValue trace(strValue) B. On Fri, May 22, 2009 at 1:04 PM, webmastermack <[email protected]> wrote: > Hi everyone, > > I have added a text string to my swf using FlashVars. I can output the > import text string to a text field just fine. However when I try to put it > into a variable that is used for criteria to contact a database, it doesn't > work. The text string is loading into the swf, the database query works when > the text string is hard coded in and the text string can be displayed on the > stage via a text field. > > How do I place the imported text string into a variable? I am overlooking > something simple no doubt, but that simple item is eluding me. > > Example: > //loads into a text field but won't stay in a variable > keyStr = stage.loaderInfo.parameters.itemID; > > > //loads into a text field but won't stay in a variable > var paramObj:Object = stage.loaderInfo.parameters; > for (keyStr in paramObj) > { > strValue = String(paramObj[keyStr]); > myText.text = strValue; > } > > > I also tried putting it into a Global variable but no success.... > > > All feedback is welcome! > > -Mack > > > > > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

