PDA

View Full Version : Why isn't ma function called?



rapier_gv
May 12th, 2008, 06:58 AM
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:



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!

Valaran
May 12th, 2008, 07:45 AM
_root.build_CRMU();

Now wasn't that an easy fix!

rapier_gv
May 12th, 2008, 08:16 AM
oh, darnit. big lol and a big thanks. :D

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