PDA

View Full Version : Setting component behaviours dynamically



Gareth Jones
July 26th, 2007, 10:48 AM
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

Gareth Jones
July 27th, 2007, 07:46 AM
I managed to get this working using MovieClip.startDrag(). How to do this is described in the Flash MX Documentation (http://livedocs.adobe.com/flash/mx2004/main_7_2/00001553.html).

Gareth