2,521,729 questions
Score of -6
0 answers
41 views
How do I do the vx = rightKey - leftKey * moveSpeed [closed]
I've been working on a simple puzzle platformer, and was trying to make the movement better, but my code:
playerV.vx = (e.code === 'KeyD' - e.code === 'KeyA') * MOVE_SPEED
was always putting 0 in ...
Score of 0
0 answers
14 views
How do I change the "hitbox" of a png/jpg to match what is and isn't transparent? [duplicate]
I want to be able to click and drag some little pngs around on my website. Right now when you click on them they just move to the front. The problem is that if you try to click on one behind another ...
Score of -5
0 answers
111 views
Why does a Promise .then() callback not execute before setTimeout() in this example? [duplicate]
I am trying to understand how the JavaScript Event Loop handles Promises, microtasks, and setTimeout callbacks. I am particularly confused about when the callback passed to the Promise constructor ...
Score of -3
0 answers
60 views
Generating Series of Date Values in an Interactive Grid [duplicate]
I am trying to set an Interactive Grid column value, which is a date, based on page items. I have tried different ways, but I am unable to get it to work in the way I need for my current project.
I ...
Score of 2
2 answers
276 views
Getting Uncaught TypeError: Cannot read properties of undefined (reading 'startTime')
I’m getting the following error in my JavaScript application:
Uncaught TypeError: Cannot read properties of undefined (reading 'startTime')
The problem is that I cannot find startTime anywhere in my ...
Score of -6
0 answers
111 views
jQuery only targets hard coded element IDs not ones in arrays [closed]
Redoing my jQuery code and left a bit confused as expected jQuery I have a web page that has to be modified after it is loaded. Using jQuery to add extra CSS classes to elements according to their ID'...
Score of -1
0 answers
99 views
Why is my stored data in my TamperMonkey giving unexpected values? [closed]
I wrote a userscript in TamperMonkey to track data for the game Cheat! on neopets.com. Basically what I'm trying to do is keep track of a stack of cards, represented by an array of objects. I'm using ...
Score of 2
1 answer
103 views
Compiling and parsing After Effects JavaScript code
I am asking this simply to know if it is possible to write all the standard functions and operations in After Effects using JavaScript and execute them—specifically, whether tasks usually performed ...
Score of -1
2 answers
116 views
Is there any legitimate use case for JavaScript encodeURI()? [duplicate]
Please don't direct me to the millions of existing posts explaining the difference between encodeURI and encodeURIComponent. I understand exactly what both functions do.
Existing sources say that you ...
Score of -2
1 answer
59 views
The React state returns null when console logging [duplicate]
This is a react dictionary project which should return meaning of the word. I have stored the response inside react state named setData. When i console log data it returns null.
import { useState } ...
Score of -2
3 answers
142 views
ReactJS (19.2) Server "LEFT JOIN" get all Results from 2. Table in first Query?
I write a Picture Site with NodeJS and ReactJS. I have 2 Nodes. First Server, second Client. On the server, I retrieve the information from the database via the client. Lately, I’ve been having a bit ...
Score of -7
0 answers
89 views
Print character that appear more then Once? [duplicate]
I just start javascript couple of days ago and i am encountering an logical error:
let text = 'hii my name is javascript and i am programming langauge which make website interactive';
let ...
Score of 0
0 answers
83 views
About sprite-flex-js issues [closed]
I'm a beginner of sprite-flex-js (Apache Royale). Right now the issue I meet is: FlashDevelop IDE has recognized a thirdpart class Stats, but when building it, the compiler shows a error: Call to a ...
Score of 0
0 answers
157 views
Rendering problem on Apple MacBook M4 Pro only? [closed]
It would be great if anyone could help confirm this error, which I so far have only seen on my Macbook M4 Pro. Is it just on my laptop or can others confirm it, too?
Problem illustration: Black areas ...
Score of 2
2 answers
133 views
React client doesn't catch the socket.on() signal from the server using setInterval
So I'm building a desktop game using electron and react currently. Now, on my server I have a code that basically does 2 things when the start game button on the client is pressed
start the game for ...