Bug in Mouse.Set Cursor from Sprite using Chrome & IE

0 favourites
  • 6 posts
From the Asset Store
Mouse cursor is something that the player controls and sees all the time, that's why it is so important to make it cool!
  • Problem Description

    When using Mouse.Set Cursor from Sprite, an issue occurs for animated cursors under Chrome & IE

    Attach a Capx

    See the example Capx here: dropbox.com/s/ilpiesz9r0zkfsu/Cursortest.capx?dl=0

    Description of Capx

    If you run this Capx, you will notice that the sprite displayed on the layout for test purposes is animated, but not the mouse cursor. If you edit the code to replace "action1.png" and "action2.png" with "press1.png" and "press2.png", you will notice that the cursor does animate properly with these other images.

    See forum thread: scirra.com/forum/issue-with-using-images-for-mouse-cursor-animation_t150940

    Steps to Reproduce Bug

    • Create a sprite with several animation frames
    • Run animation and have code with ->Sprite.On Frame Changed : Mouse.Set Cursor from Sprite
    • Execute using Chrome or IE

    Observed Result

    Mouse cursor should be animated, but instead only shows one of the sprite's frames

    Expected Result

    Mouse cursor should change with each of the sprite's animation frames

    Problem is solved if you use Mouse.Set Cursor to Normal, then use Mouse.Set Cursor from Sprite, but this should not be needed or

    should be part of warnings in the user-manual.

    Affected Browsers

    • Chrome: YES
    • FireFox: NO
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 7 Professional SP1

    Construct 2 Version ID

    R206

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Because the speed of the Default animation for the mouse is set to 0. It wont play on 0 Set it to 1-10 or anything its just personal preference but It will play if it's above 0.

  • BeckettGaming Not really sure what you are suggesting? There doesn't seem to be any mouse animation speed setting action in Construct 2.

  • It's not the mouse it's the Sprite your setting it from. So double click on the sprite that you want the mouse to be then on the right click Default, Then on the left there should be Animation Speed change that from 0 to whatever.

  • BeckettGaming I thought that it may have been what you were talking about, but this is not the issue. I just happened to have left the sprite animation speed in the Capx I saved at zero (sorry for the confusion), but you will notice that if you set it at another value, the problem is not solved unless you add the "Set Cursor to Normal" before setting it to one of the sprite's frames.

  • Closing as duplicate of https://www.scirra.com/forum/action-set-cursor-from-sprite-works-only-once-on-chrome_t150776 - should already be fixed for next build.

    Note it doesn't work in IE/Edge because the browser does not support changing the cursor.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)