# Function call keeps returning undefined !?

**URL:** <https://forum.kirupa.com/t/function-call-keeps-returning-undefined/124409>\
**Category:** Uncategorized\
**Created:** [October 3, 2004, 1:23pm UTC](https://forum.kirupa.com/t/function-call-keeps-returning-undefined/124409 "2004-10-03T13:23:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedSox](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@RedSox](https://forum.kirupa.com/u/RedSox)\
**Post date:** [October 3, 2004, 1:23pm UTC](https://forum.kirupa.com/t/function-call-keeps-returning-undefined/124409/1 "2004-10-03T13:23:30Z")

</div>

This really puzzles me. I have 5 buttons that onRelease (= when clicked) calls the same function with each a different variable.

contentLoader(profile);  
contentLoader(projects);  
and so on.

the function is:  
function contentLoader(sName:String) {  
trace(sName);  
}

Now the trace returns ‘undefined’…what I am doing wrong ? I just do NOT see it anymore 🙂

The idea behind is that I want to use a moviecliploader to load in the content corresponding with the clicked button (projects.swf,  
so it’ll use myMCL.loadClip(sName + “.swf”);

That trick always worked, but like I said, it keeps returning undefined. Did I make a mistake by strict data typing sName as a String ?

Thanks!
