why are you removing the click handler when you roll over surely when you click 
it won't work?  and why are you testing for "Home"? what is Navigation doing? 
how are you generating the item you are clicking and how are you assigning the 
eventlisteners to it? fetching the text out of a child textfield seems 
unnecessary when you could use a property or instance variable (i think thats 
what they're called in OO) of the actual target.i'm not saying any of the code 
is wrong but without seeing what Navigation does etc we won't know what's 
causing the problem. can you make a really stripped down program that can be 
pasted straight into an FLA and tested. put it on pastebin.org
thanks,
david

> Date: Sat, 13 Mar 2010 11:02:44 -0400
> Subject: Re: [Flashcoders] Passing Call To Child
> From: suzieprogram...@gmail.com
> To: flashcoders@chattyfig.figleaf.com
> 
> On Sat, Mar 13, 2010 at 10:36 AM, David Hunter 
> <davehunte...@hotmail.com>wrote:
> 
> >
> > hi susan. you can paste this directly into a new FLA and it should work. it
> > works for me: http://pastebin.org/111702
> > i've passed it two parameters one for the actual url to navigate to and one
> > without the "http://..."; junk for display in the textfield. but you could
> > add or remove the "http..." stuff at different parts of the process if you
> > only wanted to pass it one parameter but you might into problems later down
> > the line with urls that use "www" and urls that don't let alone what is
> > appended to the back ".com",".co.uk",".biz",".info" etc. i don't know
> > where you are getting the urls from but if you are storing them in an array
> > then you could just pass a number and grab the value from the array. you can
> > always add extra parameters for x and y or any other attributes. there are
> > many ways to skin a cat.
> > hope i've helped,
> > david
> >
> 
> Thank you, however, I don't think this addresses my problem. My problem is
> that I have an onMouseOver eventHandler that's running interference with the
> onClick eventHandler. For some reason I can't figure out, that mouse-over
> one mangles the on-click one. Here's the code for the mouse-over, and it's
> pretty benign:
> 
>         function onMouseOverHandler(e:MouseEvent)
>         {
>             if (e.currentTarget.name == ' Home ')
>             {
>                 e.currentTarget.removeEventListener(MouseEvent.MOUSE_DOWN,
> onMouseOverHandler);
>                 e.currentTarget.removeEventListener(MouseEvent.CLICK,
> onPressHandler);
>                 Navigation(' Home ', 'index', 235, 0x97f9ec);
> ...
> 
> I added the removeEventListeners to try and resolve the problem, but that
> didn't help. Here's the code for the other one:
> 
>         function onPressHandler(e:MouseEvent)
>         {
>             if (e.currentTarget.name == ' Home ')
>             {
>                 Navigation(' Home ', 'index', 235, 0xffffff);
>                 e.currentTarget.removeEventListener(MouseEvent.MOUSE_OVER,
> onMouseOverHandler);
>                 Navigate.to(e.currentTarget.getChildAt(1).text + '.html');
> ...
> 
> I shouldn't have to add that ".html"...that's what gets mangled. The rest of
> the url is fine, underscores and all (where applicable), so it's not just a
> duplication of the name property. I can't figure the silly thing out. Are
> there other examples of where one event handler can mangle another?
> TIA,
> Susan
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
                                          
_________________________________________________________________
Tell us your greatest, weirdest and funniest Hotmail stories
http://clk.atdmt.com/UKM/go/195013117/direct/01/_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to