When a movie clip hits here, one movie clip plays.. how do i do that?

ok i have a electrical outlet in my flash vid. when i click it, sparks come out which is a movie clip. and i have a gas tank in my vid. when i click it, gas pours out onto the floor. now when i click the spark thing and sparks come out i want it to play another movie clip(fire) at the same time. can i do this somehow?

I guess a simple if statement:

For the sparkles:


if(!_root.gas){
// just sparkle
} else {
// explode
}

And for the gas


// gas pours onto floor
_root.gas=1

hmmm ill try that, thanks!

k, this is my code,
if(!_root.gas){
// just sparkle
gotoAndPlay(1);

} else {
// explode
}gotoAndPlay(12);

but when i click the button to play the spark, it plays frame 12 even if the gas isnt there…

Kind of hard to give advice without seeing your file…

ok heres the .fla…

ok here it is, just click on the 2 items that i copied out of my bigger fla.

ohhh woops wrong file, download this one example.fla it should work now…

Failed to open document :-\

try it now example.fla up above 2 spaces, it works…

Here’s what I think you want.

ahh, perfect! thx so much!

No problem :slight_smile:

wait, when i click the spark, no fire will play, when i click the gas with the sparks then it will play. but when i take away the gas, and click the sparks, the sparks and make fire with no gas… is there a code where it says if gas movie clip does not touch spark, then do not play frame (12)??

You made the gas go away ? Like … can you ? Sorry, didn’t notice that, easy to fix :slight_smile:

Done :slight_smile:

thx dong! you helped me internally, i am eternally grateful!

You’re welcome :wink: