goto a frame when an array is empty
Im wondering, I have this script courtesy of MD004 (thanks again)
and Im wondering how I can make it goto the frame labeled "congradulations" when the array is empty. this is what I have.
Code:
function arrayRandomizer(a, b) {
var value = (random(2)==0) ? -1 : 1;
return value;
}
frames = [2,3,4,5,6,7,8,9,10,11,12,13]; // this is the array of frames
frames.sort(arrayRandomizer);
currentFrameCount=0;
function nextFrame() {
gotoAndStop( frames[currentFrameCount] );
currentFrameCount++;
}
I tried just putting a
Code:
if( frames == "" ){
_root.gotoAndPlay("congradulations");
}
but it doesn't goto the frame
any suggestions?
thanks in advance
Mark