On key press with variables

  • manjero
  • Born
  • Born
  • No Avatar
  • Joined: Mar 05, 2007
  • Posts: 2
  • Status: Offline

Post June 17th, 2007, 3:58 pm

Hi
I have 5 buttons. I want each one to be played from the keyboard with a key, but i need the specific key to each button to be a variable read from a txt file. I can load the file and store the variables but i can't pass a variable to On Keypress == variable...
any thoughts?

Thanks in advance,
Shahar Zrihen
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 17th, 2007, 3:58 pm

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post June 21st, 2007, 5:27 am

why you need to pass it to onKeypress?
Load the variables, then add a Key listener (see Key class).
then test which key was pressed. And if it matches one from the file, do something.
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 48 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.