Hi,
Is it possible to make an array of dynamic textboxes such that I can refer to them as txtBox[0], txtBox[1] etc.? If so, how would I go about doing that?
(Flash CS3)
Thanks a lot!
Can I make an array of dynamic textboxes?
Page 1 of 15 Replies - 2521 Views - Last Post: 29 October 2009 - 06:26 PM
Replies To: Can I make an array of dynamic textboxes?
#2
Re: Can I make an array of dynamic textboxes?
Posted 16 May 2009 - 07:24 AM
Please do not post duplicate threads. I have removed the others.
I know it is possible, but someone else will need to explain it as I do not have experience with AS.
I know it is possible, but someone else will need to explain it as I do not have experience with AS.
#3
Re: Can I make an array of dynamic textboxes?
Posted 16 May 2009 - 07:34 AM
Thanks, good to know it's possible. I'd appreciate if anyone would explain how to do it, please!
Sorry about the duplicates - my browser crashed and I didn't realise I'd posted so many! Thanks for deleting them.
Sorry about the duplicates - my browser crashed and I didn't realise I'd posted so many! Thanks for deleting them.
#4
Re: Can I make an array of dynamic textboxes?
Posted 16 May 2009 - 12:39 PM
cosmicappuccino, on 16 May, 2009 - 06:16 AM, said:
Hi,
Is it possible to make an array of dynamic textboxes such that I can refer to them as txtBox[0], txtBox[1] etc.? If so, how would I go about doing that?
(Flash CS3)
Thanks a lot!
Is it possible to make an array of dynamic textboxes such that I can refer to them as txtBox[0], txtBox[1] etc.? If so, how would I go about doing that?
(Flash CS3)
Thanks a lot!
i'm assuming your text boxes are on your stage already, give them instance variables.
for example
fname_ti
lname_ti
email_ti
password_ti
validate_password_ti
var txtBox:Array = new Array(fname_ti, lname_ti, email_ti, password_ti, validate_password_ti);
then you can access txtBox[0]; // will be fname_ti
you can pretty much store anything in arrays
hth
#5
Re: Can I make an array of dynamic textboxes?
Posted 17 May 2009 - 02:04 AM
Thanks very much, that looks perfect -- I'll try that
#6
Re: Can I make an array of dynamic textboxes?
Posted 29 October 2009 - 06:26 PM
cosmicappuccino, on 16 May, 2009 - 06:16 AM, said:
Hi,
Is it possible to make an array of dynamic textboxes such that I can refer to them as txtBox[0], txtBox[1] etc.? If so, how would I go about doing that?
(Flash CS3)
Thanks a lot!
Is it possible to make an array of dynamic textboxes such that I can refer to them as txtBox[0], txtBox[1] etc.? If so, how would I go about doing that?
(Flash CS3)
Thanks a lot!
do you want to place information in dynamic textboxes from an array? if so here is how:
1. create an object and place in library
2. right click on the object name and select the linkage option then click on the export for Actionscript option
3. enter a class name in the class name field and click ok
4. double click on the object in the library so it opens
5. place you dynamic text in the object
6. in the properties area give the dynamic text box an instance name
7. on the main stage go to the action script and create the array for the information you want
8. to place the information in the array create a for loop and add you information to the text field
9. add to stage
the code should look some thing like this:
yourarray = new Array;
for (var i:Number=0;i<yourarray.length;i++){
// create instances of button_proto
objectname = new objectname();
//add track items here
objectname.textfieldinstancename.text = yourinformation;
addChild(myMC);
}
hope that helps
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|