PDA

View Full Version : Help with form (Dynamic Text)


Mith
05-09-2004, 06:19 PM
Hey guys. I've searched a bit and haven't found the answer for this, so im posting it here. I have a form right. Ok, here is a cap. http://www.vitoxwebdesign.com/Form.jpg
I have three groups of radio buttons, each with two buttons. I want to be able to, based upon the selection of radio buttons, be able to display a price in the box you see. I think that dyunamic text is the way for me to go. I'm just not sure how to get from the radio button varibles to display in the text box. I think that i can do this by the value, or setting values for the variables, and prolly some if statements regarding inFocus for the buttons. Any help would be greatly appreciated.
Mith
P.S. Quick responses most welcome!

issamneo
05-10-2004, 05:10 AM
your question is not clear so
to create a text box from actionscript use createTextField
then for your problem of variable you can declare a global variable or you attach vars to the button

farafiro
05-10-2004, 06:51 AM
hi Mith
welcome to the forums

try this//add the price u want in the DATA field for each RadioButton u have
fl = new Object();
fl.click = function(evt) {
thePrice.text = evt.target.selection.data;
};
theRadioGroup.addEventListener("click", fl);

Mith
05-10-2004, 05:15 PM
ok, thanks, would i have to change anything in the as there?

farafiro
05-11-2004, 02:05 AM
yep
in each radio button's property panel, rename the radioGroup for all of them to any group you want and place it instead of 'theRadioGroup' in my script

Mith
05-11-2004, 09:41 PM
ok. Thankies much!

farafiro
05-12-2004, 01:23 AM
nop
;)