hello,
im working on this project and i’ve encountered a problem:
i have an array that includes all the frame labels that i want the array to jump to and this code for the buttons
next_btn.onRelease = function() {
if (currentLabel < labelArr.length - 1) {
currentLabel++;
gotoAndPlay(labelArr[currentLabel]);
}else{
currentLabel = 0;
gotoAndStop(labelArr[currentLabel]);
}
}
ive reached a point now that i have a movie clip on root and i want when an animation ends inside the movie clip to run this code
function() {
if (currentLabel < labelArr.length - 1) {
currentLabel++;
gotoAndPlay(labelArr[currentLabel]);
}else{
currentLabel = 0;
gotoAndStop(labelArr[currentLabel]);
}
}
ive tried this
this.onEnterFrame = function() {
if (currentLabel < labelArr.length - 1) {
currentLabel++;
gotoAndPlay(labelArr[_root.currentLabel]);
}else{
currentLabel = 0;
gotoAndStop(labelArr[currentLabel]);
}
}
but it doesn’t work and i don’t know why. im guessing that there is something to do with the script being inside the movie clip (_root.fan_mc) but i don’t know how to reformat it for it to work.
any ideas?