I have been at it for couple of days now and cannot seem to
get this going the right way. I have written two functions:
I have a movie clip on stage called (MenuLoader). when mouse
test on MenuLoader is return true, slideOut function fires and then
clearInterval clears it as soon as the mouse hitTest is true. Well,
so far, the slide out works well, but then slideIn slides the menu
down regardless of the hitTest.
Anyway, I would highly appreciate it if anyone can point me
in the right direction. What I would like to do is strictly stay
with hitTest logic. When hitTest is true, menu slidesOut and the
clearInterval() clears the called function, and when user takes the
mouse off the menu, it slides back down.
By the way, I am using LMC Tween for tweening.
Please see my code.
Thanks a lot.
I think I'd remove the intervals and run an onEnterFrame
here, although you 'could' use an interval to process the event.
also part of the problem seems to be that both of the methods will
only get fired 'once' and then the interval will stop the checks,
so you would need to 'reset' the interval on each opposing method's
firing. I think i'd go about it a bit more like this: