• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help with code

New Here ,
Nov 27, 2021 Nov 27, 2021

Copy link to clipboard

Copied

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)

Views

97

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2021 Nov 27, 2021

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 28, 2021 Nov 28, 2021

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines