goCheckBackward would be the opposite of goCheckForward:
goCheckForward = function() {
if ( index = max ) { index = 0; }
gotoAndPlay(frames[index]);
trace(frames[index]);
index++;
}
goCheckBackward = function() {
if ( index 1 ) { index = max; }
How about just a single function (ala LOTR -- one ring to rule them all)
and just pass it a 1 or -1 to indicate the direction?
/* Initialize index: */
var index:Number = 0;
/* Declare var frames as an array and populatec with frame labels: */
var frames:Array = [scene1, scene2, scene3];
/* Get
2 matches
Mail list logo