Associating a text input box to a button to set a value.

  • oblongintellect
  • Novice
  • Novice
  • oblongintellect
  • Posts: 28

Post 3+ Months Ago

1st off, I'm using Flash MX 2004.

I want to be able to associate a text box to a button. I know how to create a text box and I know how to create a button and give it the actions that it needs to have to get the job done but I don't know how to associate the two. The text box needs to set a value for a variable that will be scripted to the button.

Thanks in advance.
-OI
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Sulfin
  • Graduate
  • Graduate
  • User avatar
  • Posts: 129
  • Loc: canada

Post 3+ Months Ago

Set the text box's variable to whatever you want it to be. Then use the button to detect that variable. It's really simple.
Code: [ Select ]
on (release) {
  trace(_root.variableName);
}
  1. on (release) {
  2.   trace(_root.variableName);
  3. }

In this example, it will send your variable to the output window. (In Flash MX. Should work for 2004)

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 16 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.