chris-ELM
2/18/2016 - 5:40 PM

Gets the number of scenes in the storyline file

Gets the number of scenes in the storyline file

function getNumOfScenes(xmlIn) {
    var num = (xmlIn.getElementsByTagName("links")[0].childNodes.length);
    // if statement is used to adust for a menu screen with a slide length of 1
    if (xmlIn.getElementsByTagName("links")[0].childNodes[0].childNodes[0].childNodes.length == 1) {
        num--;
    }
    console.log("NumOfScenes: " + num);
    return num
}