# Small function problem

**URL:** <https://forum.kirupa.com/t/small-function-problem/188858>\
**Category:** Uncategorized\
**Created:** [May 11, 2006, 1:10pm UTC](https://forum.kirupa.com/t/small-function-problem/188858 "2006-05-11T13:10:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scarlac](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@scarlac](https://forum.kirupa.com/u/scarlac)\
**Post date:** [May 11, 2006, 1:10pm UTC](https://forum.kirupa.com/t/small-function-problem/188858/1 "2006-05-11T13:10:44Z")

</div>

Hi

I just created a simple function for placing my preloaders on the scene but i’m having some trouble.

can somebody help me. I know the problem is in preloaderInstanceName, but i don’t know how to resolve it.

```auto
placePreloader = function(preloaderInstanceName, posX, posY, depth) {
	this.attachMovie("preloader",preloaderInstanceName, depth);
	preloaderInstanceName._x = posX;
	preloaderInstanceName._y = posY;
}

placePreloader("preloaderNews", 400, 100, 10);
placePreloader("preloaderIntro", 300, 100, 20);

```

thx in advance
