# Naming mc with parameter

**URL:** <https://forum.kirupa.com/t/naming-mc-with-parameter/281147>\
**Category:** Uncategorized\
**Created:** [February 5, 2009, 12:59pm UTC](https://forum.kirupa.com/t/naming-mc-with-parameter/281147 "2009-02-05T12:59:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alber\_Kidd](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Alber\_Kidd](https://forum.kirupa.com/u/Alber_Kidd)\
**Post date:** [February 5, 2009, 12:59pm UTC](https://forum.kirupa.com/t/naming-mc-with-parameter/281147/1 "2009-02-05T12:59:42Z")

</div>

Hi,

I have created a function to load up my movies what I would like to do is two things

(i) change the ldr to a movieclip  
(ii) add an extra parameter to add an instance name movieclip when I call the movieclip

like this…  
loadMyImage(‘images/headers/logo.png’, 80, 20, ‘myheader’ );

Thanks,

loadMyImage(‘images/headers/logo.png’, 80, 20 );

```
      function loadMyImage(imageURL, xPos, yPos) {
    var ldr:Loader = new Loader();
    var url:String = imageURL;
     var urlReq:URLRequest = new URLRequest(url);
     ldr.load(urlReq);
    addChild(ldr);
    ldr.x= xPos;
    ldr.y= yPos;

    }
```
