Skip to main content
Participant
Nov 27, 2021 9:33 AM UTC
Question

Help with code

Hello everyone,

 

i have error with my code can anyone help me? discord is possible to

 

var tasopen = false;

 

//tas open pak draad

root.muur1.Tas.addEventListener("click",tasopen);

function tasopen()
{
root.muur1.Tas.removeEventListener("click",tasopen);
tasopen = true;
}

 

//muiscursor
createjs.Ticker.addEventListener("tick", handleTick);

function handleTick(e)
{
var g2l;
g2l = root.globalToLocal(stage.mouseX, stage.mouseY);
if(heefthamer == true)
{
root.Hamer.x = g2l.x;
root.Hamer.y = g2l.y;

}
if(heeftsleutel == true)
{
root.Sleutel.x = g2l.x;
root.Sleutel.y = g2l.y;

}
if(tasopen == true)
{
root.muur1.Draad.x = g2l.x;
root.muur1.Draad.y = g2l.y;

}

}

 

i have a error on my console:

 

createjs.min.js:12

Uncaught TypeError: h is not a function
at lib.tas.b._dispatchEvent (createjs.min.js:12)
at a.b.dispatchEvent (createjs.min.js:12)
at lib.Stage.b._dispatchMouseEvent (createjs.min.js:13)
at lib.Stage.b._handlePointerUp (createjs.min.js:13)
at lib.Stage.b._handleMouseUp (createjs.min.js:13)
at f (createjs.min.js:13)

    This topic is closed to new replies. Start a new post to keep the conversation going.

    2 replies

    Community Expert
    Nov 28, 2021 5:38 PM UTC

    Have you tried the feature code snippets? It helps with prewrittwn code for many actions. 

    Translate
    kglad
    Community Expert
    Community Expert
    Nov 27, 2021 2:59 PM UTC

    tasopen is both a variable and a function causing the error.  fix that.

    Translate