Keeping the custom cursor over content
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Keeping the custom cursor over content

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    12

    Keeping the custom cursor over content

    To use a custom cursor, simply used the following piece of code;

    Code:
    Mouse.hide();
    
    stage.addEventListener(MouseEvent.MOUSE_MOVE,follow);
    
    function follow(E:MouseEvent)
    {
    	cursor_mc.x = mouseX;
    	cursor_mc.y = mouseY;
    }
    
    cursor_mc.buttonMode = true;
    However, when I move the cursor over a content, say, a movie-clip, it stays under the movie-clip.

    How can I always keep it over content ?

    Thank you.

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,059
    Hi,

    You can use
    PHP Code:
    setChildIndex(cursor_mc,numChildren 1); 
    if you are adding stuff to the stage throughout your movie, then you may need to put the code inside of your follow function.

    Otherwise it should be ok elsewhere.

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    12
    Thank you

    Quote Originally Posted by fruitbeard View Post
    Hi,

    You can use
    PHP Code:
    setChildIndex(cursor_mc,numChildren 1); 
    if you are adding stuff to the stage throughout your movie, then you may need to put the code inside of your follow function.

    Otherwise it should be ok elsewhere.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com