# Cannot Call Same Function Twice (or more)

**URL:** <https://forum.kirupa.com/t/cannot-call-same-function-twice-or-more/307868>\
**Category:** flash\
**Created:** [April 12, 2010, 1:47pm UTC](https://forum.kirupa.com/t/cannot-call-same-function-twice-or-more/307868 "2010-04-12T13:47:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jephz](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@Jephz](https://forum.kirupa.com/u/Jephz)\
**Post date:** [April 12, 2010, 1:47pm UTC](https://forum.kirupa.com/t/cannot-call-same-function-twice-or-more/307868/1 "2010-04-12T13:47:44Z")

</div>

Hey everyone, I don’t know if I’m coding things wrong or if this is just a flash bug because I can’t call the same function more then once in a switch statement.

The function itself is coded to attach a movieclip and positioning it on the stage using parameters defined within the case statement.

But the problem here is that if I call the function like this:

```auto

function positionMovie(para 1, para 2, para 3) {
attachMovie(para 1, para 1, 0);
para1._x = para 2
para1._y = para 3
}

case 1:
positionMovie(moveClip 1, 150 , 230)
positionMovie(moveClip 2, 150 , 230);
break;

```

It will only attach “movieClip 2” and **not position it**. If I add a third function, it will only be the same, (it will be for movieClip 3 though).

If I only call one function, it will work perfectly.

Any help is greatly appreciated, as this is a major roadblock in the game I am developing.

-Jephz
