instantiate an prefab and get its child's script

I have a gameobject with 2 child and i instantiate it in script.
and i would like to call the public function in the healthbar’s script A, but i fail.

the hierachy is as below
playercard
–>healthbar //script A attached
–>playericon

and the code of instantiate is:

GameObject loadedPrefab = Resources.Load("NGUI/Membercard") as GameObject;
NGUITools.AddChild(this.gameObject,loadedPrefab);
loadedPrefab.transform.GetComponentInChildren<teammatehpbar>().setvaraible(playerid,playernickname,maxhealth,currenthealth,maxmagic,currentmagic);

as i have some other playercard in the game, so i would like to avoid using gaemobject.find, how can i solve my problem?
Thank you

Hey,

Try this and post the result

GameObject loadedPrefab = Resources.Load("NGUI/Membercard") as GameObject;
loadedPrefab.transorm.FindChild("YOUR CHILD GAME OBJECT NAME").GetComponent<teammatehpbar>().setvaraible(playerid,playernickname,maxhealth,currenthealth,maxmagic,currentmagic);