# Concatenate two strings to make a path?

**URL:** <https://forum.kirupa.com/t/concatenate-two-strings-to-make-a-path/172370>\
**Category:** Uncategorized\
**Created:** [December 13, 2005, 7:09pm UTC](https://forum.kirupa.com/t/concatenate-two-strings-to-make-a-path/172370 "2005-12-13T19:09:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hexadecimal](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@hexadecimal](https://forum.kirupa.com/u/hexadecimal)\
**Post date:** [December 13, 2005, 7:09pm UTC](https://forum.kirupa.com/t/concatenate-two-strings-to-make-a-path/172370/1 "2005-12-13T19:09:48Z")

</div>

Hi guys! I have a little problem and would be very greatful if you would help me out, i have a deadline in who days =( … i have a function that looks like this:

function laddaBild(laddamig:String, projekt:String){  
\_root.workplate\_mc.randwork2\_mc[“preloader”+laddamig+"\_mc"].target.loadMovie(this.url);

}

[color=Green]this one works fine, the problem is that i want to get the value function to replace the number two at the randwork2\_mc path… i have tried the following two solutions:[/color]

[color=Red]ONE

[/color]function laddaBild(laddamig:String, projekt){  
[color=SeaGreen][/color]\_root.workplate\_mc[“randwork”+projekt+"\_mc"][“preloader”+laddamig+"\_mc"].target.loadMovie(this.url);  
[color=SeaGreen]// I have been trying many combinations for this one, with dots before and after etc but with no luck…[/color]

}  
[color=Red]TWO

[/color]function laddaBild(laddamig:String, projekt){  
temppreloadpath = “preloader”+laddamig+"\_mc.";  
concLoadPath = “randwork”+projekt+"\_mc."+temppreloadpath;  
trace(concLoadPath);  
[color=SeaGreen]// the tracing works fine here but i dont know how to concatenate below (if its even possible)[/color]  
\_root.workplate\_mc.concLoadPath.target.loadMovie(this.url);  
[color=SeaGreen]// ok this doesnt work, concLoadPath is undefined[/color]

}

Got any ideas? Im desperate here =)
