Hello,
I'm trying to translate this gotoAndPlay/array framelabel code from as2 into html5, but I'm not having much luck:
frameLabel = new Array()
frameLabel[0] = "repeat";
frameLabel[1] = "dontrepeat";
rand = random(frameLabel.length);
gotoAndPlay(frameLabel[rand]);
I got this html5 random array code from somewhere but couldn't make it work:
var frameLabel = ["repeat", "dontrepeat"];
var rand = frameLabel[(Math.random() * frameLabel.length) | 0];
this.gotoAndPlay(frameLabel[rand]);
Anyone can help?