# Help with passing movieclip parameters

**URL:** <https://forum.kirupa.com/t/help-with-passing-movieclip-parameters/239959>\
**Category:** flash\
**Created:** [September 27, 2007, 5:24pm UTC](https://forum.kirupa.com/t/help-with-passing-movieclip-parameters/239959 "2007-09-27T17:24:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvinyorkie](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@alvinyorkie](https://forum.kirupa.com/u/alvinyorkie)\
**Post date:** [September 27, 2007, 5:24pm UTC](https://forum.kirupa.com/t/help-with-passing-movieclip-parameters/239959/1 "2007-09-27T17:24:47Z")

</div>

I have a movieclip (menu1\_mc) on my root timeline. (There will be 3 of these movieclips so I want to use the same functions to control their properties)  
For simplification, I am only showing 2 mouse events for one movieclip, over and out.

menu1\_mc.addEventListener(MouseEvent.MOUSE\_OVER,isActive);  
menu1\_mc.addEventListener(MouseEvent.MOUSE\_OUT,notActive);  
function isActive(evt:Event):void  
{  
trace(evt.target.name); // menu1\_mc  
trace(typeof(evt.target.name)); // String  
evt.target.name.x=300; // error “Cannot create property x on String.”  
evt.target.name.y=0;// error “Cannot create property y on String.”  
}  
function notActive(evt:Event):void  
{  
trace(evt.target.name); // menu1\_mc  
trace(typeof(evt.target.name)); // String  
evt.target.name.x=30; // error “Cannot create property x on String.”  
evt.target.name.y=0; // error “Cannot create property y on String.”  
}

I could sure use some help getting this to work.

TIA.
