View Full Version : Add and Remove text box as in JavaScript

04-28-2009, 05:01 PM
Hi, I am having a problem in adding and removing the the email field text boxes dynamically. I have an add button beside an email field. On clicking it a new email field is generated below it dynamically with a remove button beside it(this too dynamically).
The problem is if I have added 5 email fields and I want to, say remove the third email field, then i have to reset the 'y' position of the subsequent email field text box; i.e; I have to reset the 'y' position of 4th and 5th email fields.
This problem becomes serious if I have 10 instead of 5 email fields.
I have learn that in Javascript we can do this use of a container that automatically resets the position of the text fields. Is there any way out in Flash for this?
Any help is appreciated.

04-29-2009, 09:24 AM
Yes it is possible.


You'd have to construct a function that keeps track of the number and adjusts them accordingly, but there is plenty of functionality in AS to make it happen. However in the end, they'll both be pretty similar so you'd have to decide which you'd like.