WiiNintendo




Wiimote d-pad works in Javascript or Flash games! December 27, 2006

Filed under: Exclusive, First Look, News — hey_suburbia @ 9:24 am

The browser’s native resolution appears to be 800×500 (SuperVGA minus 100 pixels for the menu bar) at 4:3 and 1024×500 at 16:9 but there is also the “Opera for handheld” mode if you hit 2 (similar to the F11 functionality in the desktop version) which strangely doesn’t report itself as “handheld” unlike the desktop version; maybe the Opera developers could shed some light into this and tell us how to handle this nice feature? Anyway, you can also zoom (×2) a page if you think the fonts are too small to read. Yet again, if you own a small television that might still be not enough.

Javascript support is also excellent, everything runs smoothly and it has no problems at all with libraries such as jQuery4 (even Thickbox5 works; you can’t exit it, but that should be fairly easy to fix).What’s more exciting though is that it is possible to use the Wiimote’s keys in Javascript or Flash games! Here follows a key -> unicode table of the Wii Remote’s keys. Have in mind that some of those keys are reserved though.

↑ 175
↓ 176
→ 177
� 178
A 13
B 171
- 170
+ 174
1 172
2 173

Thanks Arty2

Source



Discuss this and more in our forums.
Follow WiiNintendo on Twitter.
Subscribe to our RSS Feed.
Share or Save Article:
  • Digg
  • Reddit
  • TwitThis
  • Facebook
  • del.icio.us
  • Technorati
  • StumbleUpon
  • Google
  • Tumblr
  • E-mail this story to a friend!
  • Print this article!

47 Responses to “Wiimote d-pad works in Javascript or Flash games!”

  1. 1
    joshbuhler.com Says:

    [...] Via: wiinintendo.net Trackback URL [...]

  2. 2
    diegolt Says:

    It would be great to use vNes!!

  3. 3
    audiotheory Says:

    Where exactly did you get this information? I’ve just created a test movie that show’s when a key up/down event is triggered and its keycode. None of the buttons trigger key events in Flash.
    Also from what I’ve seen they don’t in JS either.

    :theory

  4. 4
    hey_suburbia Says:

    @audiotheory

    This was a tip sent in by one of my readers, the source is here:

    http://www.legendarypokemon.net/2006/12/22/English/the-wii-browser-has-arrived

    If enough people mark this as inaccurate, I will mark it accordingly.

  5. 5
    Chris Charlton Says:

    Nice, thanks for pokin’. :)

  6. 6
    OkWii.com » Blog Archive » Wiimote d-pad works in Javascript or Flash games! Says:

    [...] ↑ 175 ↓ 176 → 177 â†? 178 A 170 B 171 – 170 + 174 1 172 2 17read more | digg story Filed under Incoming having Leave a Comment [...]

  7. 7
    Nintendo Wii’s “D-Pad” works in Flash/Javascript games! « Game Nation - Video Game News! Says:

    [...] The guys over at WiiNintendo.net have posted a pretty cool find about the Wii and it’s online capabilities. They have found that the D-Pad on the Wii-mote does actually work in flash and javascript programs. This is actually a pretty big find, because most people thought that you could only play games that used only a mouse (pointer). They have released the unicode “codes” for the different directions in hope that some snazzy users out there could create some cool online apps for the Wii. Here are the codes (in Unicode): [...]

  8. 8
    ajax everywhere » Blog Archive » Wiimote keypad mapping Says:

    [...] http://wiinintendo.net/2006/12/27/wiimote-d-pad-works-in-javascript-or-flash-games/ December 29th, 2006 at 3:05 am [...]

  9. 9
    Nox Says:

    ABS has had a special section up for Wii compatible flash games since 12 December, so this should be correct.
    http://www.albinoblacksheep.com/games/wii/

  10. 10
    hey_suburbia Says:

    @Nox

    Flash games work fine, WiiNintendo even has had a Wii Flash site set up since October, http://www.WiiFii.net

    The question is does the D-Pad work? As of right now only “mouse-only” games work. This article may shed some light on HOW to get the D-Pad to work.

  11. 11
    Davidofff Says:

    This also works with Yahoo User Interface (or YUI).

    var kl2 = new YAHOO.util.KeyListener(document, { keys:[74,175,170,171,172,174,176] },
    { fn:this.kp,
    scope:this,
    correctScope:true } );
    kl2.enable();

    The above code would pick up some of the wiimote presses, and the letter J.

  12. 12
    Davidofff Says:

    Sorry, I forgot to say I used that within an object literal. To get going straight away use

    var kl2 = new YAHOO.util.KeyListener(document, { keys:[74,175,170,171,172,174,176] },
    { fn:doKP
    } );
    kl2.enable();

    doKP = function(e){
    alert(e.toString());
    }

  13. 13
    BrokenBlog » Blog Archive » Wii Flash: The d-pad and buttons work! Says:

    [...] Yes! Score one for the good guys. The buttons on the wiimote apparently gives out key events in Javascript, so it likely does the same for Flash. Read more on it here. Posted in Actionscript / Flash, Gaming, Programming | [...]

  14. 14
    Nox Says:

    @hey_suburbia
    Damn, sorry, I somehow missed the d-pad part.
    (I promise, I will get glasses soon :P )

    Anyway, hope it works or that the guys at Opera puts in full support for it!

  15. 15
    Using the Wiimote in Flash at Aral Balkan Says:

    [...] WiiNintendo.net has posted a list of key codes that the various buttons on the Wiimote generate, stating that they work in Flash and JavaScript. Well, that’s half accurate: They do work in JavaScript but not in Flash. Adding a Key listener in Flash doesn’t register anything when the buttons on the Wiimote are pressed. [...]

  16. 16
    Aral Balkan Says:

    In addition to the trackback, above, please note that the key codes above contain two typos:

    A is 13 and 2 is 173.

  17. 17
    prestige Says:

    Excellent find! I’ve knocked together a little proof of concept if anyone is interested point your Wii browser to http://wii.teamxlink.co.uk.

    Since ajax request calls are supported it should be fairly simple to throw together some multi-user games… The 2D OOT project seems like a nice candidate.

    -prestige

  18. 18
    dr Says:

    wow, it works! but will we be able to use the 1 and 2 buttons for anything except favorites and super-zoomed-in mode?

  19. 19
    Link With Reality Web Log » links for 2006-12-28 Says:

    [...] Wiimote d-pad works in Javascript or Flash games Codes for the different buttons on the Wiimote, for use in JavaScript or flash. (tags: design wii) [...]

  20. 20
    Mario Klingemann Says:

    Here’s a demo how to make the Wiimote keys also available to Flash: http://www.quasimondo.com/flashwiimote.php

    For an explanation and source code check this link: http://www.quasimondo.com/archives/000638.php

  21. 21
    .::{WiiNintendo.net}::. Says:

    [...] As we reported last week, Arty2 got the Wiimote’s D-pad working in the Wii Opera browser using Javascript and Flash. Javascript worked great, but there were reports that the Flash input was buggy at best. [...]

  22. 22
    makaveliankode Says:

    I wonder if the same methods can somehow be applied to the nunchuck

  23. 23
    Pro Game News » Homestar Runner games make Wii’s HEAD A SPLODE Says:

    [...] Basically, the Wii versions of these games just use the Wii remote to replace the computer mouse, or use the pointer to control a character rather than the keyboard directions. While these adapted games play well enough, they wouldn’t even be necessary if Nintendo would open up the Wii remote D-pad for simple directional input on Flash animations (apparently hackers are working on just this problem). [...]

  24. 24
    Online Gaming Guide » Blog Archive » NYC: Wanna play BioShock and get paid for it? Says:

    [...] Basically, the Wii versions of these games just use the Wii remote to replace the computer mouse, or use the pointer to control a character rather than the keyboard directions. While these adapted games play well enough, they wouldn’t even be necessary if Nintendo would open up the Wii remote D-pad for simple directional input on Flash animations (apparently hackers are working on just this problem). [...]

  25. 25
    Random Clap » Blog Archive » wii&flash ma quanto ce n’è? Says:

    [...] allora rigaaa…. qua c’è troppa roba sulla connessione tra wii e flash. ecco ancora un altro sito : http://wiinintendo.net/2006/12/27/wiimote-d-pad-works-in-javascript-or-flash-games/ [...]

  26. 26
    注目!大泡泡! » Blog Archive » wiiremote ascii. Says:

    [...] http://wiinintendo.net/2006/12/27/wiimote-d-pad-works-in-javascript-or-flash-games/ [...]

  27. 27
    flash platform! {desktop, mobile, touch screen…} Says:

    [...] . wiiplayable.com . aral balkan 1 . aral balkan 2 . wiihacks . wiiNintendo [...]

  28. 28
    blog aggregatore programmazione flash » Blog Archive » Other links for Wii and Flash Says:

    [...] fwiidom.org . wiiplayable.com . aral balkan 1 . aral balkan 2 . wiihacks . wiiNintendo . [...]

  29. 29
    Gaming News » Wiimote d-pad works in Javascript or Flash games! Says:

    [...] 175 ↓ 176 → 177 â†? 178 A 170 B 171 – 170 + 174 1 172 2 17read more | digg [...]

  30. 30
    ivapaq Says:

    Hi My Name Is ivawyx.

  31. 31
    Bill Compton Says:

    Hi Jim. Photos i received. Thanks

  32. 32
    Hackszine.com Says:

    HOWTO use the Wiimote buttons in Flash…

    A while back, WiiNintendo posted the keycodes that are detectable by Javascript when the Wii’s buttons are pressed. With this ability, you can create Javascript games that will play on your Wii. Unfortunately, even though the Wii browser ships……

  33. 33
    kfxaaowvnp Says:

    Hello! Good Site! Thanks you! rscdxpajfdm

  34. 34
    Bob Says:

    Javascript? Does this mean we can play Runescape? >_>

  35. 35
    Jeff McNeill » Blog Archive » links for 2007-07-15 Says:

    [...] Wiimote d-pad works in Javascript or Flash Games (wiintendo.net) (tags: flash wii hacks) [...]

  36. 36
    ttre Says:

    Thanks a bunch!o

  37. 37
    cheng Says:

    wow nice!/

  38. 38
    Top Gaming News » Wiimote d-pad works in Javascript or Flash games! Says:

    [...] read more | digg story [...]

  39. 39
    Free Psychic Readings Says:

    wiimote rocks, that’s for sure

  40. 40
    prescription phentermine shipped no Says:

    no phentermine still prescription no prescription phentermine us

  41. 41
    X( Says:

    how the heak did you get javascript to work on the wii internet?????

  42. 42
    l Says:

    ye howd u get javascript workin coz ive been trying to get runscape workin and it wont coz its javascript

  43. 43
    lol Says:

    pre teen pageant gown

  44. 44
    Ephedrine. Says:

    Ephedrine….

    Ephedrine….

  45. 45
    Valium generic. Says:

    Valium….

    Vicoden valium. Diazepam t quil valrelease valium data sheet. Valium….

  46. 46
    Use the Wiimote buttons in your WiiFlash Content - joshbuhler.com Says:

    [...] wiinintendo.net :Flash No comments for this entry [...]

  47. 47
    Lagwbwvc Says:

    jDx5VN comment1 ,

Leave a Reply