Hello, I need some help here to unload some duplicated movieclips.
Sometimes the script is not unload all the movie clips.
And on frame 2, how to say by scripting “not go to next frame if all the movieclips is not unload”?
Well the script is:
frame1
fileToLoad = "flashText1.txt";
if (loadedVar=="yes") {
nextFrame();
} else {
gotoAndPlay(1);
}
mh_entries_X1._visible = false;
frame2
if (entriesCount > 0) {
for (var i = 0; i < entriesCount; ++i) {
unloadMovie("mh_entries_" + i);
}
}
frame3
if (fileToLoad <> ""){
ran = math.round(math.random()*1000+1);
this.loadVariables(fileToLoad+"?"+ran,0);
}
frame4
//empty
frame5
if (entriesCount > 0) {
myArray1=variable1.split("|");
myArray2=variable2.split("|");
myArray3=variable3.split("|");
var startY = 17;
if (entriesCount > 0) {
for (var i = 0; i < entriesCount; ++i) {
var name = "mh_entries_" + i;
this.mh_entries_X1.duplicateMovieClip(name, i);
this[name]._x = -236;
this[name]._y = startY + ((i-1) * startY) + startY;
this[name].title = myArray1*;
this[name].description = myArray2*;
this[name].urlTXT.text = myArray3*;
}
}
mh_entries_X1._visible = false;
}
frame6
stop();
button 1
on (release) {
if (_root.pages.scroll.scrolledMC.entriesCount > 0) {
for (var i = 0; i < _root.pages.scroll.scrolledMC.entriesCount; ++i) {
unloadMovie("_root.pages.scroll.scrolledMC.mh_entries_" + i);
}
}
_root.pages.scroll.scrolledMC.fileToLoad = "flashText1.txt";
_root.pages.scroll.scrolledMC.gotoAndPlay(2);
}
button 2
on (release) {
if (_root.pages.scroll.scrolledMC.entriesCount > 0) {
for (var i = 0; i < _root.pages.scroll.scrolledMC.entriesCount; ++i) {
unloadMovie("_root.pages.scroll.scrolledMC.mh_entries_" + i);
}
}
_root.pages.scroll.scrolledMC.fileToLoad = "flashText2.txt";
_root.pages.scroll.scrolledMC.gotoAndPlay(2);
}
Thanks