3 Replies Latest reply on Apr 20, 2010 12:17 AM by RandomReado

    Help required with arrays in Flex

    RandomReado Level 1

      I'm trying to get my head around how arrays work in Flex. Here's some code I've put together:


      var xml:XML = <data><step><name>N1</name><text>T1</text></step><step><name>N2</name><text>T2</text></step></data>;
      for each (var step:XML in xml.data.step)
          Alert.show( 'Name: ' + step.@name + ', Text: ' + step.@text );


      The idea here is I simply want to show an alert for each "step", but I can't get this to work. Can anyone help?