Author Topic: how to make it holding a key for a while?  (Read 12793 times)

Offline cooolmelody

  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
on: May 05, 2010, 08:22:32 PM
I want make it like this: shake wiiremote for press and hold a key for 1 second
but I don't know how to do
my english is not good, so please not say something too hard... :)



Offline boonjin

  • *
  • Posts: 929
  • Karma: +28/-0
  • Smoothboard Developer
    • View Profile
    • Smoothboard
Reply #1 on: May 05, 2010, 09:07:22 PM
Hi,

What do you intend to do with the suggested action? To trigger certain events on the screen?

You may use the Wiimote's accelerometer data for this.

Regards,
Boon Jin

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url


Offline cooolmelody

  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Reply #2 on: May 05, 2010, 09:14:44 PM
I mean ...like this:

if wiimote.RelAccX > 20
  press (J)     // what I want is holding J  for a second,
end if

I tried this but faild:

if wiimote.RelAccX > 20
  press (J)
  wait 1 second
  release(J)  
end if

« Last Edit: May 06, 2010, 12:56:26 AM by cooolmelody »



Offline terrence512

  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Reply #3 on: December 21, 2010, 03:24:20 AM
I have a ball which I want to rotate progressivly in the direction of the arrow key being held down. How can I do this?