action script string array?
- Started
- Last post
- 5 Responses
- Bullitt
got a set of variables I've created, and I want to batch them together and put an IF statement in there that will make any one (or 2 etc etc) of them that is true respond to action that follows.
Someone mentioned to me using a string array to me a while back? Anyone tell me how I can do this?
Thanks
- Bullitt0
so in English I'm saying if any of the the following :
stageOne
stageTwo
stageThree
stageFour
stageFive
stageSix= true then gotoAndPlay(2);
- spraycan0
Myarray=["string1","string2","st...
if (Myarray[0] || Myarray[1] || Myarray[2] ... ==true){
gotoAndPlay(2);
}
- acrossthesea0
This should work!
- fyoucher10
Correction to acrossthesea's code above on pastebin ...
Take out the return since you want to do it to any of the variables, otherwise it would only do the first one it comes to in the array...
- acrossthesea0
It sounded like he just needed one to be true though? And yes, datatype!