Hi all,
I have a pseudo code that I don’t know how to conver to actionscript and I hope that someone could help me on this one!!!
Here it goes: If Lable in the movie clip test equals to 1, 4, 7 then txt box shows “this test works”.
(In the mc_test, it has 10 lables. They are numbers 1 through 10. I want to make a if statement that will pick out some particular numbers from the lables and do something.)
Thanks a lot!
:toad:
I have a move clip called room, and inside that moive clip I have 10 frames, and in each frames I have a label. They label names are a, b, c, d, e, f, g, h, i, and j.
(you have to know that a, b, c room are in section1; d, e, f, g are in section2; g, h, i are in section3. )
Therefore, I would like an if statement that will allow me to set that if lable = a, b, c . txt box show" this is section 1" lable= d,e,f,g. txt box show" this is section 2" lable =h, i, j. txt box show" this is section3".
I hope this will clearfy!!! Thanks a lot for help!!!
thanks all!
I think I will still have to stick with the if statement because of the way that the whole fla set up.
But now I came up with this line, and I hope people can help me fix it!!!
[“I deleted your other thread because crossposting is frowned upon here”
same for the new one, this one is still in the top ten here, no need to start a new one…]
You can’t check on a frame’s label by script. As far as I know. All you can use labels for is goto’s.
Set a variable in each of these frames (as in floor = 2) , then check on that in your if…
No, as eyezburg stated, you cannot check a frames label via actionscript.
You can only gotoAndPlay (or gotoAndStop) at a frame label, that is all.
You also cannot use numbers for frame labels (just in case that was brought up) otherwise it won’t work. Numbers combined with text work though, for instance 1 will not work, but 1a will.