[fmx04]Can't create Over and Up actions for same object

I am creating an animated menu for my personal website, but it’s turning into much more of a headache than I had originally bargained for! A lot of the tough stuff is working, but now I’m up against a wall.

I know this is long, so let me start with a summary: All I need is a MouseOver and a MouseUp event on the same object.

Because of the scrolling nature of the menu, I need to have MouseOver events on each menutab. Each menu item is hidden until a MouseOver event, then it scrolls out to reveal its title. If the user clicks on the now-revealed tab, it should become the current page. If the user does NOT click the now-revealed tab, it reverts to displaying the current page’s tab instead.

This means that I need to have a MouseOver and a MouseUp (or Release) tag on my items. Since I probably confused you all as much as I just confused myself, here is the example.

http://www.stevemarshall.net/test/

The “Family” section should be displayed. As you can see, when the user runs the mouse over other tabs, they are revealed. When the mouse goes away, it reverts to the Family section because nothing else was selected.

The menu operates on frame 2 - frame 1 sets the initial variables as shown.

var sel = "family";
var games = "0";
var movies = "0";
var artwork = "0";
var yugi = "0";
var about = "0";
var links = "0";

Frame 2 operates my rollovers in a frame action as shown.

about_mc.btn_about.onRollOver = function() {
 if (games == "0") { games_mc.gotoAndPlay("_over"); }
 if (movies == "0") { movies_mc.gotoAndPlay("_over"); }
 if (artwork == "0") { artwork_mc.gotoAndPlay("_over"); }
 if (yugi == "0") { yugi_mc.gotoAndPlay("_over"); }
 if (about == "0") { about_mc.gotoAndPlay("_over"); }
 if (links == "1") { links_mc.gotoAndPlay("_out"); }
 
 games = "1";
 movies = "1";
 artwork = "1";
 yugi = "1";
 about = "1";
 links = "0"; 
 
 gotoAndStop(2);
}

… this section of code is repeated for every tab, adjusting where “1” means the tab is on the left and “0” means the tab is on the right.

I also have another hidden button - it is a border placed over the top of the menu. When the user rolls over this hidden border (when the mouse leaves the menu area), it reverts back to displaying the current menu tab. This is my _level0; the above code is entirely in the movie _level0.menu for organization.

 
 if (menu.sel == "games") {
  if (menu.games == "0") { menu.games_mc.gotoAndPlay("_over"); }
  if (menu.movies == "1") { menu.movies_mc.gotoAndPlay("_out"); }
  if (menu.artwork == "1") { menu.artwork_mc.gotoAndPlay("_out"); }
  if (menu.yugi == "1") { menu.yugi_mc.gotoAndPlay("_out"); }
  if (menu.about == "1") { menu.about_mc.gotoAndPlay("_out"); }
  if (menu.links == "1") { menu.links_mc.gotoAndPlay("_out"); }
 
 menu.games = "1";
 menu.movies = "0";
 menu.artwork = "0";
 menu.yugi = "0";
 menu.about = "0";
 menu.links = "0";
 }

… and again, this repeats for every section’s tab with the appropriate “1” and “0” setting.

I’ve finally got the animation and MouseOver events done - all I need is a MouseUp event! Can anyone help me figure out why it doesn’t accept MouseUp or OnRelease events? Reference files can be provided if they are needed. Thanks so much!

This is, of course, a work in progress. A few artifacts of testing:

  • The green squares on the left of each tab are invisible buttons to activate my rollover. I wanted to see them during testing.
  • The blue rectangles sometimes visible over the tabs’ text was a theory gone wrong; I was hoping I could click those rectangles, which are buttons (which would be invisible) to initiate the MouseUp event instead of the actual tab, which is a movie clip.
  • Needless to say, graphics are temporary! LOL
  • Coding is also not optimized yet, so it’s a little messy for now.

Thanks again!!! Any help would be appreciated.