locked
Touch works on simulator but not on surface device RRS feed

  • Question

  • Hello,

    My game works good on the simulator for touch gesture, but my game was refused for not working for touch device and a friend of mine tried and confirmed me that it doesn't work on the surface for the touch but the keyboard was ok.

    canvas = document.getElementById("gameCanvas");
    context = canvas.getContext("2d");
    canvas.addEventListener("MSPointerMove", moveInput, false);
    canvas.addEventListener("MSPointerDown", downInput, false);
    canvas.addEventListener("MSPointerUp", upInput, false);
    stage = new createjs.Stage(canvas);

    I have no clues about why it works on my PC and not on others (my friend also tried on his simulator with touch gesture and it didn't work).

    Thanks in advance,

    Arnaud T.

    Tuesday, December 11, 2012 4:35 PM

Answers

  • Could you provide some further code for us to look at then, so we can have an idea of what is going on in your event handlers? Or perhaps you could at least describe that to us in more detail? It seems like you have everything wired up correctly from the code provided above.
    • Marked as answer by Song Tian Tuesday, December 18, 2012 8:54 AM
    Wednesday, December 12, 2012 3:20 PM

All replies

  • Hi,

    I suggest you remote debugging that on your surface.

    #Running Windows Store apps on a remote machine

    http://msdn.microsoft.com/en-us/library/windows/apps/hh441469.aspx


    Roy
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, December 12, 2012 2:49 AM
  • Are you certain you've been testing with Touch Mode enabled on the emulator (check here for an older but pretty close look at the touch icon in the simulator: http://blogs.msdn.com/b/visualstudio/archive/2011/09/30/microsoft-windows-simulator-touch-emulation.aspx )? Those events do seem to work fine from a basic point of view on both my Surface, Slate and Desktop.

    If you're sure you've been trying in touch mode, is there anything about how you actually handle your events you might be able to post so we can take a look?

    Wednesday, December 12, 2012 5:28 AM
  • I don't have any personnal touch device to do that.
    Wednesday, December 12, 2012 5:33 AM
  • Yes, I'm sure. When I use the simulator, it makes a circle and when I break my event.pointerType = 2 which is MSPOINTER_TYPE_TOUCH.
    • Edited by elNono Wednesday, December 12, 2012 5:42 AM
    Wednesday, December 12, 2012 5:37 AM
  • Could you provide some further code for us to look at then, so we can have an idea of what is going on in your event handlers? Or perhaps you could at least describe that to us in more detail? It seems like you have everything wired up correctly from the code provided above.
    • Marked as answer by Song Tian Tuesday, December 18, 2012 8:54 AM
    Wednesday, December 12, 2012 3:20 PM