# Setting component behaviours dynamically

**URL:** <https://forum.kirupa.com/t/setting-component-behaviours-dynamically/233730>\
**Category:** flash\
**Created:** [July 26, 2007, 1:48pm UTC](https://forum.kirupa.com/t/setting-component-behaviours-dynamically/233730 "2007-07-26T13:48:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gareth\_Jones](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@Gareth\_Jones](https://forum.kirupa.com/u/Gareth_Jones)\
**Post date:** [July 26, 2007, 1:48pm UTC](https://forum.kirupa.com/t/setting-component-behaviours-dynamically/233730/1 "2007-07-26T13:48:04Z")

</div>

Hi,

I’ve so far written a script to read data from an XML file and create label components with text from the XML file written on them.

If I create a single label on the stage I can see how to change its behaviour (I want to make it draggable), but can’t figure out how to change the behaviour of components I create at runtime. Does anyone know how I can do this?

TIA!

Gareth
