Passing movieclip to function

function spawnTextFields(target:MovieClip,fieldName:String,txt:String,depth:Number,aSize:String,xLoc:Number,yLoc:Number){

    [target].createTextField([fieldName],5,0,0,0,0);
    [target][fieldName].text = [txt];
    [target][fieldName]._x = xLoc;
    [target][fieldName]._y = yLoc;
    [target][fieldName].autoSize = [aSize];
}

spawnTextFields(this,"cat","meow",0,"left",10,10);

Can anyone explain to me how to get my target variable in my function to work? I am trying to make it the movieclip in which to make the text field. Any help would be much appreciated.