# Best way to concatenate

**URL:** <https://forum.kirupa.com/t/best-way-to-concatenate/205536>\
**Category:** Uncategorized\
**Created:** [October 30, 2006, 5:55pm UTC](https://forum.kirupa.com/t/best-way-to-concatenate/205536 "2006-10-30T17:55:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dru\_nasty](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dru\_nasty](https://forum.kirupa.com/u/dru_nasty)\
**Post date:** [October 30, 2006, 5:55pm UTC](https://forum.kirupa.com/t/best-way-to-concatenate/205536/1 "2006-10-30T17:55:50Z")

</div>

k i’ve got a button that on release generates a random number, then attaches 1 of 4 movieclips in my library all named pos1\_mc, pos2\_mc, etc.

```auto

on (release) {
	var rand = Math.round(Math.random() *3) + 1;
	trace("pos"+rand+"_mc"+",mc"+",1");
	_root.attachMovie(?);
}

```

here’s an example of one of my trace statements: pos1\_mc,mc,1  
but to use attachmovie i know you need quotes in there like this:  
attachMovie(“pos1\_mc”,“mc”,1);

How can i get that?
