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

HTML5 Canvas - Hide Mouse

Community Beginner ,
Jun 12, 2021 Jun 12, 2021

Hi, 

i am working on a projekt that is going to run in a chromium kiosk.

I am trying to hide the mouse (arrow) without success.

 

Which is the best way to hide the mouse?

 

Thanks!

Pete

897
Translate
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

correct answers 1 Correct answer

Community Beginner , Jun 13, 2021 Jun 13, 2021

Hi,

i added the style tag 

cursor:none;

in the html document.

 

That solution worked for me!

Translate
Community Expert ,
Jun 12, 2021 Jun 12, 2021

Hi.

 

This should work:

canvas.style.cursor = "none";

 

Please let us know.

 

Regards,

JC

Translate
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 Beginner ,
Jun 12, 2021 Jun 12, 2021

Hi and thank you JC,

do i ad it as global skript?

 

Regards,

Pete

Translate
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 ,
Jun 12, 2021 Jun 12, 2021

No, because the canvas global variable won't be defined yet.

 

Put the code in the first frame of the main timeline.

Translate
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 Beginner ,
Jun 12, 2021 Jun 12, 2021

It is not working.

 

I am running your code to aminate through the mousewheel.

 

 

 

var root = this;

root.targetTimeline = this;
root.targetTimeline.loop = true;
root.targetTimeline.force = 0.7; //war 1
root.targetTimeline.friction = 0.8;
root.targetTimeline.direction = -1; // scroll direction
root.targetTimeline.minFrame = 0; // set the start range value here
root.targetTimeline.maxFrame = root.targetTimeline.totalFrames - 1; // set the end range value here
root.targetTimeline.speed = 0;
root.targetTimeline.pressed = false;

 

 

If i add the line :

canvas.style.cursor = "none";

 Nothing is working anymore.

 

Thank you for your help!

Regards

Pete

Translate
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
LEGEND ,
Jun 13, 2021 Jun 13, 2021

If it's for a kiosk, you may as well just hide the mouse cursor for the entire document.

Translate
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 Beginner ,
Jun 13, 2021 Jun 13, 2021
LATEST

Hi,

i added the style tag 

cursor:none;

in the html document.

 

That solution worked for me!

Translate
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