rgarimella
asked on
Arrays and For Loops
Hi Folks,
I have a videowindow that plays the video. Based on the current frame number i need to perform certain actions. I
I have the following if statements that I need to convert into a array for faster processing. What is the best way to do it
if ((_parent.video._currentfr ame > 1135) && (_parent.video._currentfra me < 1260)) {
_root.QA_mc._visible = true;
_root.QA_mc.gotoAndStop(2) ;
}
if ((_parent.video._currentfr ame > 1581) && (_parent.video._currentfra me < 1699)) {
_root.QA_mc._visible = true;
_root.QA_mc.gotoAndStop(3) ;
}
if ((_parent.video._currentfr ame > 700) && (_parent.video._currentfra me < 800)) {
_root.popup.gotoAndPlay("g ettingTher e");
}
Thanks
RG
I have a videowindow that plays the video. Based on the current frame number i need to perform certain actions. I
I have the following if statements that I need to convert into a array for faster processing. What is the best way to do it
if ((_parent.video._currentfr
_root.QA_mc._visible = true;
_root.QA_mc.gotoAndStop(2)
}
if ((_parent.video._currentfr
_root.QA_mc._visible = true;
_root.QA_mc.gotoAndStop(3)
}
if ((_parent.video._currentfr
_root.popup.gotoAndPlay("g
}
Thanks
RG
If this is all the code, I don't think you should use an array, as I cannot see any pattern in that script (no pattern for frame numbers, no pattern for actions - sometimes frame numbers, sometimes labels, sometimes change QA_, sometimes popup..)
ASKER
Actualy I have more than displayed here. I was just putting a sample
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.