dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Mouse over SWF causes lag??

  1. #1
    Game Developer
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    292

    Unhappy Mouse over SWF causes lag??

    Hey all,

    I'm make a game (yet it's not really a game related question). The game has lots of things moving around the screen in it. It runs quite smooth while the mouse is not over top the actual swf (so it's somewhere else on the webpage). As soon as the mouse rolls over the swf, the swf's framerate drops a noticable amount (5-10 fps).

    I only have 1 event listener on my stage listening for mouse clicks :

    Code:
    addEventListener(MouseEvent.MOUSE_DOWN, mouseClickedFunction,false,0,true);
    I have 15 or so buttons on the screen but none of them have onClick event handlers. I use the Mouse_Down event handler on the stage to detect they click and then find out what they clicked on.

    Those 15 buttons do have OnRollOver/RollOut listeners to change the look of the button.

    Any idea why my game slows down so much when the mouse enters the swf? I tried my best to have as few listeners as posssible....

    Any help you can give would be greatly appreciated!!!

    Ryan

  2. #2

  3. #3
    Game Developer
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    292
    Thanks for the reply.

    Unfortunately the game is still in development (it's a larger game of over 8000 lines of code). Showing you a link to the game or showing you the code is not possible at this time.

    I was just hoping someone had run into this problem before and had an idea.

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