On key press with variables

  • manjero
  • Born
  • Born
  • manjero
  • Posts: 2

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

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.

Post Information

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

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