In your example code, 'month' IS undefined. Array first element is [0] and
as your trace says "trace(stringArray[j+1]);", that's exactly what you'll
get the first time through. Also, the for next loop won't increment the j
variable until the loop is completed. Let me know if I have misenterpreted
your question.

flashcoder.net

> Hello,
>   Firstly, I know that the eval(); method is old ("depreciated"),  but I
> have come to appreciate it.  And I am wanting to work it in  a for loop
> generating and array.  Here is the set up.  array of strings
>
> stringArray = new Array("string1","string2","etc");
>
> for(j=0;j<stringArrayTotal;j+=2){
>  trace(stringArray[j+1]);     //traces element expected at j+1 value;
>  month = eval(months[j+1]);
>  trace(month);                  //traces undefined;
> }
>
>
> an answer to the above question would be obviously appreciated.
>
> thank you,
>
> Vdst
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to