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

HTML5 Canvas - Hide Mouse

Community Beginner ,
Jun 12, 2021 Jun 12, 2021

Copy link to clipboard

Copied

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

Views

583

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

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!

Votes

Translate

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

Copy link to clipboard

Copied

Hi.

 

This should work:

canvas.style.cursor = "none";

 

Please let us know.

 

Regards,

JC

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

Copy link to clipboard

Copied

Hi and thank you JC,

do i ad it as global skript?

 

Regards,

Pete

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

Copy link to clipboard

Copied

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

 

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

LATEST

Hi,

i added the style tag 

cursor:none;

in the html document.

 

That solution worked for me!

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