# Why isn't ma function called?

**URL:** https://forum.kirupa.com/t/why-isnt-ma-function-called/260061
**Category:** flash
**Created:** [May 12, 2008, 9:58am UTC](https://forum.kirupa.com/t/why-isnt-ma-function-called/260061 "2008-05-12T09:58:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rapier\_gv](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@rapier\_gv](https://forum.kirupa.com/u/rapier_gv)
#### Post date: [May 12, 2008, 9:58am UTC](https://forum.kirupa.com/t/why-isnt-ma-function-called/260061/1 "2008-05-12T09:58:23Z")

</div>

Hello everybody, got a new annoying problem to tackle, i’ve been working on a ( quite simple ) piece of code the last couple of days, but i’ve encountered this really frustrating issue: one of the functions isn’t called.

this is the bit which has issues:

```auto

evolution();
function evolution() {
    //
    _root.onEnterFrame = function() {
...
           if (time%ed_CRMU == 0){
            //
            message_txt.text = "CRMU needed!";
            //
            var build_CRMU = _root.createEmptyMovieClip("build_CRMU", 11); 
         ** build_CRMU.onEnterFrame = function() {
                    build_CRMU();
                };**
            }
    };
}

```

and, of course, below, i have the build\_CRMU function. the thing is that it won’t call it ( tried with trace(“OK”) inside the build\_CRMU function, but trace(“OK”) in the onEnterFrame function works.

this is really mindboggling for me. i cannot realise what am i doing wrong. i went ahead and attached the full .fla source as well. thanks for any advices!

---

<div class="post-metadata">

### Author: ![Valaran](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@Valaran](https://forum.kirupa.com/u/Valaran)
#### Post date: [May 12, 2008, 10:45am UTC](https://forum.kirupa.com/t/why-isnt-ma-function-called/260061/2 "2008-05-12T10:45:04Z")

</div>

\_root.build\_CRMU();

Now wasn’t that an easy fix!

---

<div class="post-metadata">

### Author: ![rapier\_gv](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@rapier\_gv](https://forum.kirupa.com/u/rapier_gv)
#### Post date: [May 12, 2008, 11:16am UTC](https://forum.kirupa.com/t/why-isnt-ma-function-called/260061/3 "2008-05-12T11:16:29Z")

</div>

oh, darnit. big lol and a big thanks. 😃

and to think i’ve been wrestling with this for almost 3 days. lol.
