# Calling function at end of recurency

**URL:** <https://forum.kirupa.com/t/calling-function-at-end-of-recurency/247138>\
**Category:** flash\
**Created:** [December 18, 2007, 9:27pm UTC](https://forum.kirupa.com/t/calling-function-at-end-of-recurency/247138 "2007-12-18T21:27:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)\
**Post date:** [December 18, 2007, 9:27pm UTC](https://forum.kirupa.com/t/calling-function-at-end-of-recurency/247138/1 "2007-12-18T21:27:44Z")

</div>

Is there a way to call a function only at and of multiple recurency?  
I have a code like this

```auto
  private function _markTile(tile:Tile):void {
   if (tile.mark()) return;
   var array:Array=new Array();
   array.push(_getNeighbourToLeft(tile),_getNeighbourAbove(tile),_getNeighbourToRight(tile),_getNeighbourBelow(tile))
   for each (var element:Tile in array) if (getQualifiedClassName(tile)==getQualifiedClassName(element)) _markTile(element);
   }

```

I want to remove marked tiles at once…
