PDA

View Full Version : Adding roll_over/mouse_over text to container



MSR
March 18th, 2009, 07:24 AM
Hi,

I am trying to create a container MovieClip with several TextField elements contained within it. I then need the TextFields to react to ROLL_OVER or MOUSE_OVER. This works fine if the fields are placed outside of the container, but not when I do
container.addChild(textField);The TextFields are added after the container, and new ones may be created or removed later during the running of the movie. I've tried changing the value of container.mouseChildren but that didn't seem to make a difference.

Thanks for your help.

bzouchir
March 18th, 2009, 10:36 AM
how r you adding your event listeners?

here's a great intro senocular wrote, explaining the process:
http://www.senocular.com/flash/tutorials/buttoncapturing/

MSR
March 18th, 2009, 10:58 AM
The TextFields are created within a function which is called for each piece of text that needs to be created. Event listeners for rolling over and out are created at that point within the function definition.

The container MovieClip doesn't have any events listeners associated to it at all as it is only intended for containing purposes.

MSR
March 19th, 2009, 02:56 PM
If I add the container as a child after each batch of TextFields is added then it seems to work but then the whole application slows down for a second and is not a smooth process at all.