0 Replies Latest reply on May 2, 2010 11:52 PM by welcomecan

    how to create dynamic arraycollection menu item in flex?

    welcomecan Level 1

      hi to all,

      any body help me,

        i am doing dynamic arraycollection menu bar. my source code below  but it is not working



      ?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                     xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="initData()" minWidth="955" minHeight="600">
                      import mx.collections.*;
                      public var stateArray:ArrayCollection;
                      private function initData():void {
                          stateArray=new ArrayCollection(






                  /* for (var i:uint; i < s.length; i++) {
                  }  */
          <mx:MenuBar id="ss" labelField="@label">
                  <fx:XMLList xmlns="">
                      <menu label="@stateArray[0]" >
                          <item label="@stateArray[1]" />
                          <item label="@stateArray[2]" />


              <!-- Place non-visual elements (e.g., services, value objects) here -->



      give solution please