Synchronization

Hi All,
I’m expertising problems with removeMovieClip() and DuplicateMovieClip() methods.
In particular, I need to remove MovieClips created with duplicateMovieClip() and then create them again.
The code look like this:

QUOTE […]
for (i = 0;i<oldColNum;i++){
removeMovieClip("_root.w3Chart.crtOptions.symColy" + (i+1));
}
for (i = 0;i<oldColNum;i++){
duplicateMovieClip("_root.w3Chart.crtOptions.symColy0",“symColy” + (i+1),i+1000);
}
[…]

It seem sensible, first I remove all movieclips created elsewhere, then I create them again.
It doesn’t work unless I put a delay between the two operations:

[QUOTE][…]
for (i = 0;i<oldColNum;i++){
removeMovieClip("_root.w3Chart.crtOptions.symColy" + (i+1));
}
_root.intevalD = setInterval(duplication, 500);
duplication = function() {
for (i = 0;i<oldColNum;i++){
duplicateMovieClip("_root.w3Chart.crtOptions.symColy0",“symColy” +
(i+1),i+1000);
}
clearInterval(_root.intervalID);
_root.intervalID = undefined;
}
[…]
I don’t like this kind of workaround, because the success of the application depends on the machine speed! If a PC is not able to remove all movieclips in 500ms, the problem arise again, isn’t it??

I hope someone has some idea…

thanks in advance,

:frowning: