FORUMS: list search recent posts

MOUSE_OUT not working on Mac

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jessica Bassett
MOUSE_OUT not working on Mac
on Aug 28, 2011 at 10:08:19 pm

I'm having an issue with a drop down menu not returning to it's regular state after you have rolled over it. This issue is occurring in Firefox, and Safari and on my Mac. I visited the site [URL="http://www.jabsgallery.info"]http://www.jabsgallery.info[/URL] on a oc and the drop down menu worked just fine.

Does anyone have a clue as to why this is happening?
I thought it might have something to do with my MOUSE_OUT property
but I'm not sure.

If you could please submit your ideas / solutions it would be much appreciated
the link to the site is [URL="http://www.jabsgallery.info"]http://www.jabsgallery.info[/URL]
the drop down menu is under the Tours tab in the main navigation
and I will also include the flash source file.
2868_map.fla.zip

thanx a bunch

- jess


Return to posts index

Mike Smith
Re: MOUSE_OUT not working on Mac
on Aug 29, 2011 at 12:08:45 pm

At first sight your mouseout event is not working on Windows either. Looking in the file, for your mouseout event i see

NavBar_mc.addEventListener (MouseEvent.MOUSE_OVER, navOverF);
NavBar_mc.addEventListener (MouseEvent.MOUSE_OUT, navOutF);

function navOverF (event:MouseEvent):void {
event.target.filters = [navBtnGlow];
NavBar_mc.setChildIndex(event.target as MovieClip, 1);
DropMenu_mc.gotoAndStop(NavBar_mc.getChildAt (1).name);
trace("ae are rolled over..." + NavBar_mc.getChildAt (1).name)
}
function navOutF (event:MouseEvent):void {
event.target.filters = [ ];
}

}


So the navOutF which looks empty / uncompleted. Maybe you need to set the mouseout behaviour to reverse the changes from the mouseover ..?


Return to posts index

Jessica Bassett
Re: MOUSE_OUT not working on Mac
on Aug 29, 2011 at 8:33:50 pm

That code was written for the glow filter, I don't know what i would put there to get it to not show the drop down menu. The code that was written for the drop down menu is inside the gradient bar called dropDown_mc or it's instance name "DropMenu_mc" here is the code.

stop();
GalleryFrame_btn.addEventListener (MouseEvent.MOUSE_OVER, goBackF);
function goBackF (event:MouseEvent):void{
gotoAndStop(1);
}


:/


Return to posts index


Mike Smith
Re: MOUSE_OUT not working on Mac
on Aug 29, 2011 at 9:15:14 pm

I guess it needs a mouseout event listener, that relates to the image on frame 1 and sends the button/movieclip back to frame 0 ...

so it might be worth trying something like
GalleryFrame_btn.addEventListener (MouseEvent.MOUSE_OVER, goBackF);
GalleryFrame_btn.addEventListener (MouseEvent.MOUSE_OUT, reSetF);
function goBackF (event:MouseEvent):void{
gotoAndStop(1);
}
function reSetF (event:MouseEvent):void{
gotoAndStop(0);
}

That's assuming that GalleryFrame_btn starts on Frame 0 with the dropdown closed, and on Frame 1 has the dropdown open ....


Return to posts index

Jessica Bassett
Re: MOUSE_OUT not working on Mac
on Aug 29, 2011 at 11:32:21 pm

didn't work >_< I think the code on the main timeline and the code in the drop down need to be changed/ corrected. I'll get into it more later, im trying to get this website up by Thursday @_@


Return to posts index

demetri tashie
Re: MOUSE_OUT not working on Mac
on Aug 30, 2011 at 2:54:25 am

hi jessica,

doing good dropdowns in flash is actually a confusing issue for a lot of people. i have been asked to write a tutorial on it several times. it is on my list, so who knows.

in looking at your file. i think there are many things that could be improved. one overall thing is to first check that your file is compiling correctly. i did receive an 1009 error that should be resolved

next thought is to not use MouseOver/Out, but to rely on ROLL_OVER/ROLL_OUT instead.

third is to review the construction of the 'drop down' menu. much better to not have it have its own timeline, with code inside of it (directing it to go go back to frame 1). If this movieclip is itself a 1 frame movieclip, you will have MUCH better control over it.

built and coded correctly, they can work as expected ( do keep in mind that anyone zipping their mouse back and forth over an object listening for rollovers, etc, can confuse the flash engine if they are that fast. same with basic html/css drop downs).

i took the menu on its own and placed it in a html page to do some tests. you can see the result here and test if it works in the different browsers. i believe it should. i made 2 different versions - one, regular( the top one) , and the bottom one having the drop down fade in and out ( via TweenLite)

here's the code i used for the top version:
DropMenu_mc.visible = false;

NavBar_mc.tours_mc.addEventListener(MouseEvent.ROLL_OVER,showTours);
function showTours (event:MouseEvent):void{
DropMenu_mc.visible = true;
DropMenu_mc.addEventListener(MouseEvent.ROLL_OUT,noShowTours);
NavBar_mc.tours_mc.removeEventListener(MouseEvent.ROLL_OVER,showTours);
}

function noShowTours (event:MouseEvent):void{
DropMenu_mc.visible = false;
DropMenu_mc.removeEventListener(MouseEvent.ROLL_OUT,noShowTours);
NavBar_mc.tours_mc.addEventListener(MouseEvent.ROLL_OVER,showTours);

}

DropMenu_mc.day_1_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_2);
function fl_ClickToGoToWebPage_2(event:MouseEvent):void
{
// navigateToURL(new URLRequest("../pages/dayTours.html"), "_self");
trace( "1 day");
}


here's a shot of the main timeline:



here's the timeline of DropdownMenu_mc:


one of the tricks of this is to have an invisible(alpha=0)movieclip over the original button ( the 'Tours' button of the menu)

i hope this makes sense. i'd be glad to explain further if you want.


Return to posts index


Jessica Bassett
Re: MOUSE_OUT not working on Mac
on Aug 31, 2011 at 6:26:37 pm

Sounds like there is alot more that goes into flash AS3 then I realized >_<
I've been trying to teach myself this summer and well you can c how far I've gotten. Thank you for the explanation and code I will do what you've suggested and get back to you. It may not be for a little bit because I've got to get this website done.

I did have a question about the new Main timeline set up and coding.
What did you end up doing with everything on the main timeline, like
the map and such? And did you leave the glow filter in place?

And in the dropDown_mc have you deleted everything except what shown in the screen shot? And if so would this new code and timeline set up still work with the glow? or should i just loose it and add and overstate to the buttons?

btw I did fix the 1009 error

Thanx a bunch, wish I had time to check out the new system / set up.
But false is just wasting to much of my time, since im a slow rookie.


Return to posts index

demetri tashie
Re: MOUSE_OUT not working on Mac
on Aug 31, 2011 at 8:07:17 pm

jessica,

if you've just started learning this summer, then congratualtions - you have learned a lot already. don't be discouraged, it can seem like there is so much to learn. and there is, but a lot of it is because there are actually many different ways to approach projects and even every aspect of a project. that is a good thing.

take for instance creating a button. you could make a graphic and turn it into a button symbol and change its 'up'. 'over', 'down', and 'hit' states, or you could create a movieclip symbol with a timeline to act as a button, or you could have a movieclip symbol used as a button change its 'states' strictly via code.

re your questions:

- i stripped out everything but the bare essentials, to best illustrate what i was trying to explain. i find it is always best to work with a stripped down version to make sure it works, and to make sure i understand HOW it works. then you can start adding back the 'bells and whistles' one at a time, testing after each addition to see that it is still working, and if not, you know exactly what needs to be addressed.

- same thing for the drop down. i wasn't even sure what that long 'bar' was for anyway. it didn't seem germain to the question or task at hand

- it should still work with the glow filter if you need that

- i am not even sure i saw the glow filter in action. i personally wouldn't use it, but that is just me. filters can sometimes strain resources.

good luck with getting this site up and running. do let us know how it comes along, as well as other questions you might have.


Return to posts index

Jessica Bassett
Re: MOUSE_OUT not working on Mac
on Sep 1, 2011 at 2:52:32 am

Thank you for the encouragement! and words of wisdom. I feel better about my skills now and am eager to learn more. I have noticed the trend of a 100 different ways to do everything in javascript, and I will learn to appreciate it, but Im more overwhelmed by it at this point.

I also agree on the filter it seems unnecessary if you can just add a up, over, and down state to a button. And it will look pretty much the same.

Thanx again for your help.
see you around the forum


Return to posts index


Theodore Rosenbaum
Re: MOUSE_OUT not working on Mac
on Sep 26, 2011 at 6:42:23 am

Know form honolulu web design


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]