PDA

View Full Version : Getting Data from a text box within an accordion


yourguide
11-21-2005, 05:43 PM
I am really new to actionscript, and I have searched all of the web to find the answer to this. I am guessing the answer is so simple that thats why I cant find it.

Please forgive my ignorance.

I have a form in Flash that has an accordion component in it with 5 movie clips in it.

I want to get the data from some text boxes that are in the accordion.
right now I have a variable holding my data called "dataSender"
The code works for the text boxes in the main flash movie, but it just puts "Undefined" in the text fields for the text boxes in the movie clips.
My code looks like this:

These Work:
dataSender.Phone = Phone.text;
dataSender.Fax = Fax.text;
These dont:
dataSender.Itm1Qty = Item1.Itm1Qty.text;
dataSender.Itm2Qty = Item2.Itm2Qty.text;

"Item1" Is the name of the first Movie Clip in the Accordion, "Item2" is the second movie clip, etc.

Itm1Qty and Itm2Qty are the names of the Text Boxes within their respective movie clips.

Is there someway for me to tell flash to pull the data from the movie clip, I tried the above thinking that adding the name of the movie clip before the name of the textbox within the clip would work.... but it doesn't.

Please help if you can... thanks.
I am thinking it is just a syntax thing.

amen0
11-21-2005, 06:05 PM
can u post ur sample .fla ?

yourguide
11-21-2005, 06:56 PM
Its a little bit too large for the message board, but I uploaded here, so just follow the link below:

http://www.outofthegarage.org/excessinvform.zip

Thanks for your help.
The actionscript that is giving me problems is on line 112 - 131 of the first frame of the "Logic" Layer.

amen0
11-21-2005, 07:17 PM
hi,
replace:
Item1-->Items._child0
Item2-->Items._child1
Item3-->Items._child2
Item4-->Items._child3
Item5-->Items._child4

yourguide
11-28-2005, 02:41 AM
Thank you. I looked over the documentation for the accordion component, but it just didnt occur to me that I needed to reference it differently.

Thanks...