seems that my clearInterval is not working
i want to make the setInterval only call the function once and stops
here’s my code
createPortfolio = function (portSource, portLength) {
// clearInterval(_root.intervalID);
this.created = false;
this.onEnterFrame = function () {
if(this.created == false) {
for (i = 0; i < portLength; i++) {
this.attachMovie ("titlemc", "titlemc" + i, 10 + i);
this["titlemc" + i]._x = 470;
this["titlemc" + i]._y = (25 * i) + 15;
this["titlemc" + i].interval = (1000 + (i * 50));
this["titlemc" + i].count = i;
_root.intervalID = setInterval (delay, this["titlemc" + i].interval, portSource*, this["titlemc" + i]);
this.created =true;
}
}else{
clearInterval(_root.intervalID);
}
};
};
delay = function (portSource, myTitlemc) {
myTitlemc.gotoAndPlay (2);
myTitlemc.work_name.text = portSource.work_name;
};