# Add url to the MCs on the fly

**URL:** <https://forum.kirupa.com/t/add-url-to-the-mcs-on-the-fly/122817>\
**Category:** Uncategorized\
**Created:** [September 17, 2004, 12:15pm UTC](https://forum.kirupa.com/t/add-url-to-the-mcs-on-the-fly/122817 "2004-09-17T12:15:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NovemberRain](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@NovemberRain](https://forum.kirupa.com/u/NovemberRain)\
**Post date:** [September 17, 2004, 12:15pm UTC](https://forum.kirupa.com/t/add-url-to-the-mcs-on-the-fly/122817/1 "2004-09-17T12:15:20Z")

</div>

Is it possible add link to a duplicated movieclips dynamically?

A movieclip named “box” on the stage and duplicated using the following code

```auto

width = _root.box._x;
for (i=0; i<10; i++){
_root.box.duplicateMovieClip ("box" add i, i);
_root["box" add i]._x = width * i;
}

```

That is the root created the movieclips box1, box2 and sofar… How can we create different links to these mcs that are created on the fly?

I’ve also tried the following code but i’m getting the only link that “file10.html”

```auto
  
width = _root.box._x;
for (i=0; i<10; i++) {
 _root.box.duplicateMovieClip("box" add i, i);
 _root["box" add i]._x = width*i;
 _root["box" add i].onRelease = function() {
  getURL("file" add i add "." add "html");
  trace("file" add i add "." add "html");
 };
}

```
