2 Replies Latest reply on Oct 17, 2016 1:30 PM by Zipzap32

    How to customise a cursor ?

    Zipzap32 Level 1

      Hello everyone my code is making the cursor blink : each time the timeline loops my custom cursor blink , I try to show the user that he can't press the mouse when the crosshair is on a sprite

      ================

      /*the custom cursor sprite is called curseur*/

      this.curseur.visible = false;

       

      /* Curseur de souris personnalisé*/

      this.addEventListener("tick", fl_CustomMouseCursor_29.bind(this));

      function fl_CustomMouseCursor_29() {

          this.curseur.x = stage.mouseX;

          this.curseur.y = stage.mouseY;

      }

       

      /* Evénement MouseOver*/

      var frequency = 3;

      stage.enableMouseOver(frequency);

      this.zoneinterdite.addEventListener("mouseover", fl_MouseOverHandler_25.bind(this));

      function fl_MouseOverHandler_25()

      {

          this.curseur.visible = true;

      }

       

      /* Evénement MouseOut*/

      var frequency = 3;

      stage.enableMouseOver(frequency);

      this.zoneinterdite.addEventListener("mouseout", fl_MouseOutHandler_17.bind(this));

      function fl_MouseOutHandler_17()

      {

          this.curseur.visible = false;

      }