for (var i=1; i<=5; i++) {
trace(this.xmlClass.xmlData["RecImageW"+i]);
}
should work
hth,
cedric
Another one for you...
I am having some trouble with dynamic variables, basically I expect
this['xmlClass.xmlData.RecImageW' + 1] to mean
xmlClass.xmlData.RecImageW1, but it seems it does not?
// VALUES
xmlClass.xmlData.RecImageW1 = 120;
xmlClass.xmlData.RecImageW2 = 1220;
xmlClass.xmlData.RecImageW3 = 3;
xmlClass.xmlData.RecImageW4 = 23;
xmlClass.xmlData.RecImageW5 = 222;
for (var i = 1; i <= 5; i++)
{
trace( this['xmlClass.xmlData.RecImageW' + i] );
}
// OUTPUT SHOULD BE
120
1220
3
23
222
xmlData is type XML in the class xmlClass, it is set as public and
tracing xmlClass.xmlData.RecImageW1 works so I know I can access
the value, I just need a method that will loop through all of the
variables and trace them.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders