# Conditional function

**URL:** <https://forum.kirupa.com/t/conditional-function/21509>\
**Category:** flash\
**Created:** [May 22, 2003, 1:51pm UTC](https://forum.kirupa.com/t/conditional-function/21509 "2003-05-22T13:51:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![beanboy](https://avatars.discourse-cdn.com/v4/letter/b/91b2a8/32.png) [@beanboy](https://forum.kirupa.com/u/beanboy)\
**Post date:** [May 22, 2003, 1:51pm UTC](https://forum.kirupa.com/t/conditional-function/21509/1 "2003-05-22T13:51:24Z")

</div>

Hi, I am confused,

How would I write a function to make flash wait until a process is true before it can carry on. I know of if…else and switch but what other options do I have here??

The process would be like this:

If movieclip is at coordinates 0,0  
then load into it  
then move it down  
otherwise move it up to 0,0  
and then load into it

Any ideas? Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 22, 2003, 1:59pm UTC](https://forum.kirupa.com/t/conditional-function/21509/2 "2003-05-22T13:59:48Z")

</div>

you would use if statements to check where the movieclip is.

```auto

if(there){
//do this... (load movie)
}else{
//do this.. (move up)
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 22, 2003, 5:36pm UTC](https://forum.kirupa.com/t/conditional-function/21509/3 "2003-05-22T17:36:11Z")

</div>

this might help (if it doesnt confuse heh)  
[http://proto.layer51.com/d.aspx?f=875](http://proto.layer51.com/d.aspx?f=875)
