# tellTarget(\_level) and passing data to functions

**URL:** <https://forum.kirupa.com/t/telltarget--level-and-passing-data-to-functions/141323>\
**Category:** Uncategorized\
**Created:** [March 18, 2005, 9:35pm UTC](https://forum.kirupa.com/t/telltarget--level-and-passing-data-to-functions/141323 "2005-03-18T21:35:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerryj](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jerryj](https://forum.kirupa.com/u/jerryj)\
**Post date:** [March 18, 2005, 9:35pm UTC](https://forum.kirupa.com/t/telltarget--level-and-passing-data-to-functions/141323/1 "2005-03-18T21:35:12Z")

</div>

Hi,  
I have this problem:

First I load this movie in the main movie on level5:

```auto
loadMovie('submenu.swf',5);

```

on a button in the main movie I put:

```auto
tellTarget(_level5){
gotoAndPlay(2);
subMenu(91,97,134,'0x333333',cursusbuttonsMC);
}
}

```

on the second frame of the movie 'submenu.swf ’ that is being loaded in level5 I put:

```auto
stop();
subMenu=function(a,b,c,d,e){
cursusMC.tween("_width",a,0.3,"easeInCubic");
cursusMC.tween("_height",b,0.5,"easeOutBack",0.6);
cursusMC.tween("_y",c,0.3,"easeInCubic");
cursusMC.colorTo(d,1,"easeOutCubic");
e.alphaTo(100,0.3,"easeInCubic",1.2);
}

```

Now, when I click the button it goes to the second frame of the movie in level5, but it doesn’t call the function right away. It calls it when I click the button a second time. How can I make the function work right away?

I hope my question is clear.  
Thank you very much,  
Jerry.
