0
votes

i am shocked to see that

var stage = new createjs.Stage("demoCanvas");
        var circle = new createjs.Shape();
        createjs.Touch.enable(stage);
        circle.graphics.beginFill("red").drawCircle(0, 0, 50);
        circle.x = 100;
        circle.y = 100;
        circle.addEventListener("click", function (evt) { 
            alert('clicked'); 
        }, false);
        stage.addChild(circle);
        stage.update();

is not working in the IE11 on my window surface. Any substitute for this event so i can perform click function

2
Are you clicking on it with a mouse, or are you just tapping the touch screen?Rowland Shaw
i am tapping the screenJot Dhaliwal
i am posting the codeJot Dhaliwal
so what type is createjs?Rowland Shaw
@RowlandShaw - It's EaselJS I think, and it creates a custom graphics object, but that object should have an addEventListener, not sure if it's the native one or a custom eventListener though ?adeneo

2 Answers

0
votes
 $("#circle").click(function(e) {
alert("clicked");

}); use jquery instead of javascript

0
votes

For Windows 8 and touch screens, the following should work

document.addEventListener("pointerdown", function (evt) { 
    alert('clicked'); 
}, false);

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

MSPointerDown can be used with IE10, it has been deprecated in IE11+ in favor of pointerdown.