arrays and loading movies
Hi,
I have spent weeks in trying to solve this, any help would be greatly appreciated.
Below is the code snippet
function eduPlay()
{
for (var i:int=0; i<introAni.length; i++)
{
if (introAni == "University")
{
trace("University is selected");
for (i=0; i<introAni.length; i++)
{
for (var k:int=0; k<eduUniMatch.length; k++)
{
var matchNum:Number = findIndexInArray(eduUniMatch
for (var j:int=0; j<eduUniMatchUrl[matchNum].length; j++)
{
if (introAni == eduUniMatch
{
//trace("Match found at " + eduUniMatch
trace("Match Num found at " + matchNum);
//trace("eduUnMatch length is " + eduUniMatchUrl[matchNum].length);
startArr.splice(matchNum,0,eduUniMatchUrl[matchNum]);
//startArr.split(String.fromCharCode(10));
trace("The value of startArr is " + eduUniMatchUrl[matchNum]);
trace("The value of startMainArr is " + startArr);
//break;
}
break;
}
}
}
}
if (introAni == "School")
{
trace("School is selected");
}
}
}
I want to achieve the below:
load the swf files stored in an array based on what parameter is selected in the xml file. It may be different combinations.
To explain it in short. I have 4 base arrays Introduction, Demo, Overview and Training. The user may select any combination of these like Introduction + Training or Overview + Demo or Introduction + Demo + Overview or all the four or it may be any one of these.
These files should always play in sequence like these Introduction, Demo, Overview, Training. If user selects Introduction + Demo. Intro should play first and then demo. If Demo and Training are selected Demo should come prior to Training and so on.
I am able to load files and play them as well using the above function. But if there are more then one file in an array say for example in Training it does not load and play. I tried to use the String.split to split it into different files using comma but it doesn't work. Another issue i did face is the files are not playing sequentally.
If for example Demo and Training are selected by the user Training is played first and then demo.
Would be helpful for me if someone guides me on this.
