Thanks Dave but No It does not change anything same problem.
On Tue, Apr 21, 2009 at 7:38 PM, Dave Watts <[email protected]> wrote:
> > this is a silly problem that, because it is silly, makes me nervous and
> > frustrate at the same time.
> >
> > I've got a class (extends Sprite) that has embedded some MovieClips.
> Those
> > MCs are actually containing textboxes with the name of the sections.
> >
> > for each MC
> >
> > MC.addEventListener(MouseEvent.ROLL_OUT, onRollOut);
> > MC.addEventListener(MouseEvent.ROLL_OVER, onRollOver);
> >
> > private function onRollOut(e:MouseEvent):void {
> > //change colors here of e.currentTarget
> >
> > }
> >
> > private function onRollOver(e:MouseEvent):void {
> > //change colors here of e.currentTarget
> >
> > }
> >
> > In the Main Class I am adding the above class to the displayList and I
> set
> > Click Listeners for each of its children
> >
> > var CurrentLink:Sprite // assume it holds a reference of a link
> >
> > var linkbar:LinkBar = new LinkBar();
> > linkBar.link1.addEventListener(MouseEvent.CLICK, onClick);
> >
> > private function onClick(e:MouseEvent):void {
> > e.currentTarget.mouseEnabled = false;
> > CurrentLink.mouseEnabled = true;
> > CurrentLink = e.currentTarget;
> >
> > }
> >
> > The link clicked is now disabled but there is a little problem, the
> > CurrentLink still listens for RollOut events as its color change when i
> take
> > the mouse off it. I think it shouldn't because I am setting its
> mouseEnabled
> > to false.
>
> I think that, for every rollover, there has to be a corresponding
> rollout before you can effectively disable the event listener.
>
> http://www.actionscript.org/forums/showthread.php3?t=157859
>
> I could be wrong about this, and would welcome correction if that's the
> case!
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
>
> Fig Leaf Software provides the highest caliber vendor-authorized
> instruction at our training centers in Washington DC, Atlanta,
> Chicago, Baltimore, Northern Virginia, or on-site at your location.
> Visit http://training.figleaf.com/ for more information!
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
--
Omar M. Fouad - Adobe Flashâ„¢ Platform Developer
www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: [email protected]
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders