# How to pass a parameter to a MovieClip

**URL:** <https://forum.kirupa.com/t/how-to-pass-a-parameter-to-a-movieclip/331192>\
**Category:** flash\
**Created:** [June 10, 2013, 8:17am UTC](https://forum.kirupa.com/t/how-to-pass-a-parameter-to-a-movieclip/331192 "2013-06-10T08:17:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![panoss](https://avatars.discourse-cdn.com/v4/letter/p/db5fbb/32.png) [@panoss](https://forum.kirupa.com/u/panoss)\
**Post date:** [June 10, 2013, 8:17am UTC](https://forum.kirupa.com/t/how-to-pass-a-parameter-to-a-movieclip/331192/1 "2013-06-10T08:17:15Z")

</div>

I have a flash application (the main movie) and in it a movieClip (I call it my\_dialog).  
When the main movie starts, I want to pass a parameter (the user’s username) in to the movieClip (code in main.fla: my\_dialog.username(“panoss”)).  
In my\_dialog I have made a function called ‘username’. But it says that the username is ‘undefined’.  
I think the problem is that the movieClip ‘my\_dialog’ has not yet been loaded at the time of the call. What can I do;
