hi guys I'm working on a carousel and i have a quick question about adding a non-active area in the middle
at the moment, the carousel will move forward and backward based on the mouse's position in relation to the center of the carousel but I'd like to widen that by nDeadzoneRadius here is the way that i'm doing it at the moment - it seems very clunky to me but it's doing the job this is on the onMouseMove listener private function adjustSpeed():Void { var nMousePos:Number = _root._xmouse - nCenterX; // !HACK! this is the bit i'm querying if (Math.abs(nMousePos) < nDeadzoneRadius) nMousePos = 0; else nMousePos = (nMousePos > 0) ? nMousePos - nDeadzoneRadius : nMousePos + nDeadzoneRadius; // end of !HACK! nSpeed = nMousePos / ((36 / _nNumberOfItems) * 1000); //4:800, 8:4000, 12:3000, 24:1500 } so i guess my question is, is there a more elegant solution to this, please? ta a _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders