# Dynamic functions? v2.0 (simplified)

**URL:** <https://forum.kirupa.com/t/dynamic-functions-v2-0-simplified/178826>\
**Category:** Uncategorized\
**Created:** [February 14, 2006, 4:12pm UTC](https://forum.kirupa.com/t/dynamic-functions-v2-0-simplified/178826 "2006-02-14T16:12:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snx](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/snx/32/929_2.png) [@Snx](https://forum.kirupa.com/u/Snx)\
**Post date:** [February 14, 2006, 4:12pm UTC](https://forum.kirupa.com/t/dynamic-functions-v2-0-simplified/178826/1 "2006-02-14T16:12:16Z")

</div>

i think my last post might have been confusing so here is a simplified version:

```auto

var movies = new Array();
movies[0] = 'overview';
movies[1] = 'east';
movies[2] = 'surveys';
movies[3] = 'core';
loadThumbs();
function loadThumbs()
{
 len = movies.length;
 for (i=0; i<len; i++)
 {
  this.attachMovie(movies* + '_thumb', 'mc' + movies*, 100 + i);
  eval("this.mc" + movies*)._x = i * 100;
  eval("this.mc" + movies*).stop();
 }
}

```

now, i need the to create dynamic functions that will play() the movieclips on roll over…

any comments on the code??? like i said b4 i’m coming from php and although there is definitely a familiarity, code optimizations etc… are appreciated…

what i tried to do is create this function within the loadThumbs()function, however movies\* is undefined

```auto

  eval("this.mc" + movies*).onRollOver = function()
  {
   //eval("mc" + movies*).play();
   trace movies*);
  }

```

take care,  
snx :hr:
