Detecting when a user drags over an adcontrol in a HTML5/Javascript app?
ads, html, javascript, windows, windows-8
Solution
Here is a working example which releases the touch when the hand is moved over the ad : http://jsfiddle.net/ChaitanyaMunipalle/jn3kZ/
You can see all the touch events below the canvas in this jsfiddle.
Check HammerJs for drag, release and other touch gestures. You can use touch events like normal jquery events like
$('#canvasId').on('dragstart drag dragend release ....',callback);
Problem
Hi I developed a game using Construct2 and included an AdControl inside main html page that came with the exported project. Now I noticed when you drag from the game canvas onto the ad and release, it never actually releases the touch. My game is dependent on a particular touch so I actually need that touch to reset if the user stops touching the screen. Am I missing something here, or is there maybe a workaround for this issue? I tried out the same thing in C#, using a WebBrowser control and I didn't experience the same issue. I have tried a few things like HTML fragments and separating the div from the canvas with margins but it always acts the same way. I also tried to include the ad using a Windows Runtime Component but it doesn't look like it allows you to pass UI elements like the AdControl. Does anyone have some suggestions. Thanks.