I am building a photo slideshow and I want to add a next/back button to the mouse cursor. If the mouse is on the right half of the screen, it displays a right arrow (indicating that onclick, it will load the next photo). When on the left half, it displays a left arrow (onclick loads the previous photo).
My question is this: is there a better way to do this than using onMouseMove and onMouseDown event handlers? My code is below. Adding these event handlers is making my SWF eat up 20% more of the CPU resources. Is there a less processor intensive method of achieving this? A Group94 site seems to do a good job of this without hogging CPU cycles: http://www.schierke.com/home.php?p= // w=screenWidth onMouseMove=function() { arrowL._x=_xmouse-14; arrowL._y=_ymouse+4; arrowR._x=_xmouse+14; arrowR._y=_ymouse+4; if (_xmouse<w/2) {arrowL._visible=true; arrowR._visible=false;} else {arrowR._visible=true; arrowL._visible=false;} } onMouseDown=function() { if (_xmouse<w/2) {loadImage(current-1);} else { loadImage(current+1);} } _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com