Is it possible to do multiple if statements? I’m trying to get something like the following to work:
stop();
continueb_lilmine3.addEventListener(MouseEvent.CLICK, overHandler);
function overHandler(evt:MouseEvent):void
{
if(MovieClip(root).lilmine_cell4.currentFrame == 3)
if(MovieClip(root).lilmine_cell2.currentFrame == 3)
{MovieClip(parent).gotoAndStop(5);
}else{
{gotoAndStop(3);
}}}
The ifs seem to work, but the else does not. It says stuck on frame 2 of the continueb_lilmine3 MC.
Your syntax is a bit off. An
ifstatement should have a code block (or a single line of code) after it.[Edit]
I believe your code seems to work, because according to the compiler, your first
ifstatement is followed by exactly one statement — the if/else construct. So in effect, perhaps your code is doing this:And thus the else never executes.
[end]
[Edit #2]
Here is what you are probably after: