all groups > flash actionscript > february 2006 >
You're in the

flash actionscript

group:

if for movie clips


if for movie clips arianegame
2/14/2006 10:57:50 PM
flash actionscript:
Helpmeeeeee

I am making a little game. i need put a conditional that when all the
movieclips (bolas) are visibles go to the next frame. Like if the all the
movieclips are visibles so go to frame 2.

I dont know how can be the sintaxis mistake:

if (bola, _visible, "1") ||(bola2, _visible, "1")
||(bola3, _visible, "1") ||(bola4, _visible, "1")
{gotoAndStop(2)}
else (bola, _visible, "0") ||(bola2, _visible,
"0")||(bola3, _visible, "0") ||(bola4, _visible, "0")
{gotoAndStop(1)}
Re: if for movie clips NSurveyor
2/14/2006 11:59:14 PM
You can't make up your syntax. By the way, you should be using && instead of
the || in the if statement, and you can simply have else instead of the
conditions since it is implied if all the clips aren't visible. Lastly,
_visible is already a boolean, so you don't need to use 1 or 0 (which you are
using as a string btw). It should simply be:

if(bola._visible && bola2._visible && bola3._visible && bola4._visible){
this.gotoAndStop(2);
}else{
this.gotoAndStop(1);
}
Re: if for movie clips arianegame
2/15/2006 6:06:20 PM
Does?nt funcion still.
When all are visibles the movie doesn?t go to the next frame

Could be because on first frame of the movie i have the action

setProperty(bola, _visible, "0");
setProperty(bola2, _visible, "0");
setProperty(bola3, _visible, "0");
setProperty(bola4, _visible, "0");

It?s because i had called before this movie in the 3 level, and so i need that
it?s present but without the "bolas" while another file gives the order

Thanks a lot

Ariane
AddThis Social Bookmark Button