i’m creating a menu where i place movieclips dynamiclly:
for each (var button:XML in XMLgothrough) {
    //Create a new menu item
    var menuItem:MenuItem=new MenuItem  ;
    menuItem.name="menuItem"+count;
    //Position the menu item with some padding (space between the items)
    menuItem.x=0;
    menuItem.y=count*menuItem.height*1.33;
…
in another function i try and move one of the menu items:
function itemClicked(e:Event):void {
               menuItem1.x=100;
}
but i keep getting a ReferenceError: Error #1065: Variable menuItem1 is not defined.
at MethodInfo-359()
error.
any ideas what i’m doing wrong?