A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Custom cursor is slow and laggy.

  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    15
    hi, well i created my own cursor...and it will be used on a sidebar menu click the link too see it http://www.geocities.com/redalertw0/cursor.html see how its all slow and laggy?, is there any way i can fix it soo that is normal thanx

    btw here is the code i used so if u can tell me and modifications too the code that will fix it please tell me


    startDrag ("cursordrag", true);
    Mouse.hide();

    PauLizno1
    [Edited by paulizno1 on 06-29-2002 at 12:47 AM]

  2. #2
    FK's official coffee addict gasbag15's Avatar
    Join Date
    Aug 2001
    Location
    Melbourne
    Posts
    1,867
    I didn't get any lag.

  3. #3
    We Hate Ars*nal
    Join Date
    Mar 2001
    Location
    North London!
    Posts
    439
    I didn't get an lag either, but try putting this on the custom cursor

    Code:
    onClipEvent (mouseMove) {
    	_x += _xmouse;
    	_y += _ymouse;
    	updateAfterEvent();
            Mouse.hide();
    }

  4. #4
    Senior Member
    Join Date
    Jun 2001
    Posts
    2,943
    Also, if you have the default 12fps set, up it to 24fps.

    That smoothes it out.

    I can see what you are getting at from your link - you'll find 24fps much better.

  5. #5
    Junior Member
    Join Date
    Jan 2002
    Posts
    15

    Smile thanx

    oh thanx thats exactly what i wanted ive got another queston...say if the cursor is used on a sidebar.... and you move the mouse off the sidebar is there any way so that when you move the mouse off the side bar the cursor fades out and when you put the mouse back on, the cursor fades back?

    PauLizno1

  6. #6
    Senior Member
    Join Date
    Jun 2001
    Posts
    2,943
    I don't think there is (or can't think of) a built-in way in Flash 5, but one way around it would be to have an invisible button slightly smaller than the movie area.

    Use 'on rollout' and 'on rollover' actions to tell the custom cursor movie clip to goto and play the fade in and fade out parts that you put in it.

  7. #7
    Junior Member
    Join Date
    Feb 2010
    Posts
    9

    Thumbs up

    Quote Originally Posted by giapai3k View Post
    I didn't get an lag either, but try putting this on the custom cursor

    Code:
    onClipEvent (mouseMove) {
    	_x += _xmouse;
    	_y += _ymouse;
    	updateAfterEvent();
            Mouse.hide();
    }
    OMG i love you. I just look this up because i haven't been using my custom cursor since (it is laggy) and i thought to try and find a solution, and this works!!! thaaaaaaaaaaanks!

  8. #8
    Dignitary rynoe's Avatar
    Join Date
    Jan 2003
    Location
    Earth
    Posts
    760
    Code:
    updateAfterEvent();
    is AS3

    I'm not sure it's providing anything at all as it works without it, but what do I know.

    Also you only need to hide the mouse once, not every time the mouse moves, but again what do I know.
    Last edited by rynoe; 06-26-2012 at 02:17 PM. Reason: my cat committed suicide
    [SIGPIC][/SIGPIC]

  9. #9
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Wrong, rynoe, updateAfterEvent is available in AS2 as well

    It forces the MouseMove function to render as fast as the mouse moves regardless of the framerate. Omitting it will make it look laggy, especially if the framerate is 12
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  10. #10
    Dignitary rynoe's Avatar
    Join Date
    Jan 2003
    Location
    Earth
    Posts
    760
    we are both wrong
    WRONG! WRONG! WRONG!

    Futher investigation sais it was acually as1!
    Actually kinda interesting as it fires independent the fps..

    only works on mouse and gesture events.

    linky
    Last edited by rynoe; 06-26-2012 at 03:28 PM. Reason: Cat rose from the dead
    [SIGPIC][/SIGPIC]

  11. #11
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Oh, haha
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  12. #12
    We Hate Ars*nal
    Join Date
    Mar 2001
    Location
    North London!
    Posts
    439
    well ... my reply was in 2002

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