# Pausing Flash/Actionscript itself....not timeline

**URL:** <https://forum.kirupa.com/t/pausing-flash-actionscript-itself-not-timeline/220858>\
**Category:** Uncategorized\
**Created:** [March 29, 2007, 10:05pm UTC](https://forum.kirupa.com/t/pausing-flash-actionscript-itself-not-timeline/220858 "2007-03-29T22:05:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_MODI](https://avatars.discourse-cdn.com/v4/letter/r/c37758/32.png) [@Ryan\_MODI](https://forum.kirupa.com/u/Ryan_MODI)\
**Post date:** [March 29, 2007, 10:05pm UTC](https://forum.kirupa.com/t/pausing-flash-actionscript-itself-not-timeline/220858/1 "2007-03-29T22:05:32Z")

</div>

Hey everyone,

This is my first post here at Kirupa and Im really hoping I can get some help.

Im writing an application that parses xml to display a menu system in Flash. The same loop that grabs the xml creates a new movie clip for each node(menuitem)

I need to set a delay between the duplicated movie clips so they appear one after another rather than all at the same time. Ive tried a few different things (interval and timer) but havent got it to work. I have no doubt that this is possible but I am fairly new to AS. Any help would be greatly appreciated.

Here is the code with a little comment where I want what I want.

```auto
 
var item_spacing = 60; 
var item_count = 0;
var item_count_next = 0;
var newy = 0;
_global.itemNumber = "";
function CreateMenu(menu_xml){
 _global.items = menu_xml.firstChild.firstChild.childNodes; 
 
 for (var i=0; i<items.length; i++) { 
 
   var item_mc = menu_mc.attachMovie("menu_item","item"+item_count, item_count);
   item_mc._y = item_count * item_spacing;
 
   if(item_count > 3){
    item_mc._y = item_count_next * item_spacing;
    item_mc._x = 350;
    item_count_next++;
   }         
 
   item_count++;
   item_mc.txt.text = items*.attributes.type;    
 
   item_mc.main_btn.onRelease = function(){      
    item = this._parent._name.toString();
    itemNumber = item.substr(4,2);   
   gotoAndPlay(10);
 
   }    
/*I NEED THIS LAST LINE IN THE FOR LOOP TO PAUSE FOR .5 SECONDS */
 
 }
}
var dining = new XML();
dining.ignoreWhite = true;
dining.onLoad = function(success){
 if (success) CreateMenu(this);
 else trace("Error loading XML file");
}
dining.load("dining.xml");
stop();

```
