RE: [Flashcoders] hitTest unreliability
If possible then perhaps increasing the frame rate, the theory being that there will be more tests going on and less likely the mouse has moved outside the hit area before the test is performed. I guess increasing the frame rate may not be an option. Hope that helps Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: 29 April 2009 14:29 To: Flash Coders List Subject: [Flashcoders] hitTest unreliability Hi list... [AS2] If I moderately rapidly move the mouse in and out of a ScrollPane component, a hitTest on movieclips contained within the ScrollPane won't always evaluate correctly. I can't figure out why it's so unreliable, working only about 65% of the time. The ScrollPane contains a bunch of movieclips, each with the onRollOut function attached: if(this._parent.hitTest(_root._xmouse, _root._ymouse)==false){ O.UI.firstLevelMenu.flmSP.content.topicSynopsis.removeMovieClip(); } Any thoughts? - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] hitTest unreliability
my guess is that you're actually passing over the whole clip you're hitTesting against in the time it takes for the frame to go by - you could try saving the previous mouseposition and the current mouseposition and then testing to see if the path between them crosses your clip On Wed, Apr 29, 2009 at 2:29 PM, Mendelsohn, Michael michael.mendels...@fmglobal.com wrote: Hi list... [AS2] If I moderately rapidly move the mouse in and out of a ScrollPane component, a hitTest on movieclips contained within the ScrollPane won't always evaluate correctly. I can't figure out why it's so unreliable, working only about 65% of the time. The ScrollPane contains a bunch of movieclips, each with the onRollOut function attached: if(this._parent.hitTest(_root._xmouse, _root._ymouse)==false){ O.UI.firstLevelMenu.flmSP.content.topicSynopsis.removeMovieClip(); } Any thoughts? - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] hitTest unreliability
Thanks for the responses. I think this is probably the solution because when I set the framerate to 1fps, it always errorred. Thanks - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders