• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

place value of component input inside textfield

When I choose either a radio button, checkbox or a selection from dropdown, how can place the value of that data inside a textfield on mouse up using flash components?  I'm outputting as flash player 6, actionscript 2.0.
0
COwebmaster
Asked:
COwebmaster
  • 2
1 Solution
 
rascalpantsCommented:
well, first of all, I don't think you can even use Actionscript 2.0 in player 6...  so you need to change that...

my recommendation is to use Flash Player 8...  it has over 95% market penetration, and is much more advanced than player 6 or 7.   So change that....

you would use the instance name of the component with getValue()

so if your checkbox as named "myCheckBox"  then you would use this code to set the value

myTextBox.text = myCheckBox.getValue();


rp


0
 
COwebmasterAuthor Commented:
that didn't work.  So when the user clicks on the radio button (not checkbox), the data gets inputted into a textfield.  Any more suggestions?
0
 
rascalpantsCommented:
well, your original question asked for "either a radio button, checkbox or a selection from dropdown"...  

so you have decided to just use radiobuttons?

here is some code that you would need to develop...


var rListener:Object = new Object();
rListener.click = function(evnt:Object) {
      myTextBox.text = myRadioButton.__data;
};
myRadioButton.addEventListener("click", rListener);


here I am actually accessing the public property "__data"  which is what you can set in the properties box.

I still don't know how you are building your application, so if you can give me some more details, I can give you better answers.


rp

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now