# Passing Variables betwen Functions

**URL:** <https://forum.kirupa.com/t/passing-variables-betwen-functions/309895>\
**Category:** flash\
**Created:** [May 27, 2010, 3:39am UTC](https://forum.kirupa.com/t/passing-variables-betwen-functions/309895 "2010-05-27T03:39:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SiegeFilms](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@SiegeFilms](https://forum.kirupa.com/u/SiegeFilms)\
**Post date:** [May 27, 2010, 3:39am UTC](https://forum.kirupa.com/t/passing-variables-betwen-functions/309895/1 "2010-05-27T03:39:13Z")

</div>

I am attempting to create a simple conditional animation but I’m having problems passing the conditions around.

I have three separate movieclips: (A, B, C) that can all be triggered by user actions.

If any one of the three clips is currently playing, none of the other clips should play.

If a movieclip is triggered by a user action, I need to check if any of the clips are still playing before it can play the clip.

Initially I set up a series of if/then statements in the mouse\_click functions dependant upon a variable being passed between all the separate functions. The functions could not accept both a mouse click, and a variable.

Why not? How can I get around this?

Is there a better to way to accomplish what I am attempting?

Thanks in advance!!
