Hi Bob,

Thanks for the code. Unfortunately the code you gave me didn't work for my 
AS3/CS3 file.  However I can trace out the data via for loop or through 
stage.loaderInfo.parameters directly.  But the only thing I can do with the 
data is print it out. (If I use the for loop I have the print is out inside the 
loop). This is really frustrating!  I don't need to print it out, I need to use 
it as a variable in a database query and it just won't go in!

Were you able to use your variable data in this way?

-Mack

--- On Fri, 5/22/09, Bob Wohl <[email protected]> wrote:

From: Bob Wohl <[email protected]>
Subject: Re: [Flashcoders] FlashVars - place data in a variable
To: "Flash Coders List" <[email protected]>
Date: Friday, May 22, 2009, 1:17 PM

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




_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to