# Why is it bad to add dynamic properties to movieclips?

**URL:** <https://forum.kirupa.com/t/why-is-it-bad-to-add-dynamic-properties-to-movieclips/329009>\
**Category:** flash\
**Created:** [July 12, 2012, 9:30pm UTC](https://forum.kirupa.com/t/why-is-it-bad-to-add-dynamic-properties-to-movieclips/329009 "2012-07-12T21:30:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dragonfly](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dragonfly](https://forum.kirupa.com/u/dragonfly)\
**Post date:** [July 12, 2012, 9:30pm UTC](https://forum.kirupa.com/t/why-is-it-bad-to-add-dynamic-properties-to-movieclips/329009/1 "2012-07-12T21:30:43Z")

</div>

Hello Kirupa,

I often do something like the following to add dynamic properties to MCs to be passed to a handler.

(note I use Flash to make touchscreen kiosk apps 99% of the time, so I don’t bother with button objects with roll-overs, etc)

```auto

function myFunction():void
{
     var mc:MovieClip = new MovieClip();
     mc.somethingMyHandlerNeedsToKnow = "I am awesome";
     mc.addEventListener(MouseEvent.MOUSE_DOWN, mcButtonHandler);
}
function mcButtonHandler(event:MouseEvent):void
{
     var whatINeedToKnow:String = event.currentTarget.somethingMyHandlerNeedsToKnow;
     trace(whatINeedToKnow); //traces "I am awesome"
}

```

Will this cause memory issues? Famine in 3rd world countries?

Or is it just “bad OOP practice”, but really just harmless if it gets the job done?

Thank you.
