Right then... I'm creating a site entirely of flash, using Flash MX 2004. My aim is to have a menu system, with submenus, and sub-submenus etc, that are produced at run-time from a XML file.
The base of each menu item is stored in the library with linkage identifier s_menuItem which consists of just a button and a dynamic text field. I have a function drawMenuItem that is called from a loop. This function attachs a menu item using:

menuMain.attachMovie('s_menuItem', 'menuItem'+i, i, initProperies);

I then use a with instruction to alter the text field and button width of the newly created menuItem.
This works fine, however, if I try to reference one of the menu items outside of the drawMenuItem funtion nothing happens... whats more, if I use:

with( menuMain.menuItem1 ){... }

an error is thrown up saying that the object doesn't exist... even though it appears in the list of objects when i CTRL+SHIFT+ENTER to debug the movie.

I did a little test a simply created a new document that has one function that attaches a movie clip to _level0. I can access the attached movie clip from inside the function it was created in, but not outside of it! any ideas why this is happening.

Thanks in advance.
Craig.