Flash navigation problem

  • BrianTheMapper
  • Newbie
  • Newbie
  • BrianTheMapper
  • Posts: 13
  • Loc: Indiana

Post 3+ Months Ago

I've made a flash menu with a fairly large amount of code. Its at http://www.techhounds.com. its the top menu. I know, ignore the frameset. If you go over the buttons too fast, the sub menus will overlap. Is there a way to fix this? I was thinking naming the function. Right now this is the code;

Code: [ Select ]
import mx.transitions.Tween;
import mx.transitions.easing.*;

var subbernumber:Number = 1;
var startYabout:Number = subabout_mc._y;
var startYfirst:Number = subfirst_mc._y;
var startYsponsors:Number = subsponsors_mc._y;
var startYmedia:Number = submedia_mc._y;
var startYmembers:Number = submembers_mc._y;
var about_fade:Tween;
var about_topmove:Tween;
var first_fade:Tween;
var first_topmove:Tween;
var sponsors_fade:Tween;
var sponsors_topmove:Tween;
var media_fade:Tween;
var media_topmove:Tween;
var members_fade:Tween;
var members_topmove:Tween;

subabout_mc.subhistory_btn.enabled = false;
subabout_mc.subbranches_btn.enabled = false;
subabout_mc.subawards_btn.enabled = false;
subabout_mc.subcommunityoutreach_btn.enabled = false;
subfirst_mc.game2008_btn.enabled = false;
subfirst_mc.subsummary_btn.enabled = false;
subfirst_mc.sublinks_btn.enabled = false;
subsponsors_mc.subcurrentsponsors_btn.enabled = false;
subsponsors_mc.subbecomeasponsor_btn.enabled = false;
submedia_mc.subpictures_btn.enabled = false;
submedia_mc.subpromovideo_btn.enabled = false;
submedia_mc.subanimations_btn.enabled = false;
submedia_mc.subnewsletter_btn.enabled = false;
submembers_mc.subforums_btn.enabled = false;
submembers_mc.subscholarships_btn.enabled = false;
submembers_mc.subtutoringlist_btn.enabled = false;
submembers_mc.subsampleletter_btn.enabled = false;
submembers_mc.subpermissionslips_btn.enabled = false;
submembers_mc.cmembers_btn.enabled = false;

home_btn.onRollOver = function () {
    if(home_popup._alpha == 0) {
        about_popup._alpha = 0;
        first_popup._alpha = 0;
        game_popup._alpha = 0;
        sponsors_popup._alpha = 0;
        media_popup._alpha = 0;
        members_popup._alpha = 0;
        contactus_popup._alpha = 0;
        first_popup.gotoAndStop(1);
        about_popup.gotoAndStop(1);
        game_popup.gotoAndStop(1);
        sponsors_popup.gotoAndStop(1);
        media_popup.gotoAndStop(1);
        members_popup.gotoAndStop(1);
        contactus_popup.gotoAndStop(1);
        subabout_mc.subhistory_btn.enabled = false;
        subabout_mc.subbranches_btn.enabled = false;
        subabout_mc.subawards_btn.enabled = false;
        subabout_mc.subcommunityoutreach_btn.enabled = false;
        subfirst_mc.game2008_btn.enabled = false;
        subfirst_mc.subsummary_btn.enabled = false;
        subfirst_mc.sublinks_btn.enabled = false;
        subsponsors_mc.subcurrentsponsors_btn.enabled = false;
        subsponsors_mc.subbecomeasponsor_btn.enabled = false;
        submedia_mc.subpictures_btn.enabled = false;
        submedia_mc.subpromovideo_btn.enabled = false;
        submedia_mc.subanimations_btn.enabled = false;
        submembers_mc.subforums_btn.enabled = false;
        submembers_mc.subscholarships_btn.enabled = false;
        submembers_mc.subtutoringlist_btn.enabled = false;
        submembers_mc.subsampleletter_btn.enabled = false;
        submembers_mc.subpermissionslips_btn.enabled = false;
        submembers_mc.cmembers_btn.enabled = false;
        subabout_mc._alpha = 0;
        subfirst_mc._alpha = 0;
        subsponsors_mc._alpha = 0;
        submedia_mc._alpha = 0;
        submembers_mc._alpha = 0;
        subabout_mc._y = startYabout;
        subfirst_mc._y = startYfirst;
        subsponsors_mc._y = startYsponsors;
        submedia_mc._y = startYmedia;
        home_popup._alpha = 100;
        home_popup.play();
    }
}

about_btn.onRollOver = function () {
    if(about_popup._alpha == 0) {
        home_popup._alpha = 0;
        first_popup._alpha = 0;
        game_popup._alpha = 0;
        sponsors_popup._alpha = 0;
        media_popup._alpha = 0;
        members_popup._alpha = 0;
        contactus_popup._alpha = 0;
        home_popup.gotoAndStop(1);
        first_popup.gotoAndStop(1);
        game_popup.gotoAndStop(1);
        sponsors_popup.gotoAndStop(1);
        media_popup.gotoAndStop(1);
        members_popup.gotoAndStop(1);
        contactus_popup.gotoAndStop(1);
        subfirst_mc.game2008_btn.enabled = false;
        subfirst_mc.subsummary_btn.enabled = false;
        subfirst_mc.sublinks_btn.enabled = false;
        subsponsors_mc.subcurrentsponsors_btn.enabled = false;
        subsponsors_mc.subbecomeasponsor_btn.enabled = false;
        submedia_mc.subpictures_btn.enabled = false;
        submedia_mc.subpromovideo_btn.enabled = false;
        submedia_mc.subanimations_btn.enabled = false;
        submembers_mc.subforums_btn.enabled = false;
        submembers_mc.subscholarships_btn.enabled = false;
        submembers_mc.subtutoringlist_btn.enabled = false;
        submembers_mc.subsampleletter_btn.enabled = false;
        submembers_mc.subpermissionslips_btn.enabled = false;
        submembers_mc.cmembers_btn.enabled = false;
        subfirst_mc._alpha = 0;
        subsponsors_mc._alpha = 0;
        submedia_mc._alpha = 0;
        submembers_mc._alpha = 0;
        subfirst_mc._y = startYfirst;
        subsponsors_mc._y = startYsponsors;
        submedia_mc._y = startYmedia;
        submembers_mc._y = startYmembers;
        about_popup._alpha = 100;
        about_popup.play();
        subabout_mc.subhistory_btn.enabled = true;
        subabout_mc.subbranches_btn.enabled = true;
        subabout_mc.subawards_btn.enabled = true;
        subabout_mc.subcommunityoutreach_btn.enabled = true;
        subabout_mc._alpha = 100;
        about_fade = new Tween(subabout_mc,"_alpha",Regular.easeOut,0,100,3,false)
        about_topmove = new Tween(subabout_mc,"_y",Regular.easeOut,startYabout,startYabout-35,3,false)
    }
}

first_btn.onRollOver = function () {
    if(first_popup._alpha == 0) {
        home_popup._alpha = 0;
        about_popup._alpha = 0;
        game_popup._alpha = 0;
        sponsors_popup._alpha = 0;
        media_popup._alpha = 0;
        members_popup._alpha = 0;
        contactus_popup._alpha = 0;
        home_popup.gotoAndStop(1);
        about_popup.gotoAndStop(1);
        game_popup.gotoAndStop(1);
        sponsors_popup.gotoAndStop(1);
        media_popup.gotoAndStop(1);
        members_popup.gotoAndStop(1);
        contactus_popup.gotoAndStop(1);
        subabout_mc.subhistory_btn.enabled = false;
        subabout_mc.subbranches_btn.enabled = false;
        subabout_mc.subawards_btn.enabled = false;
        subabout_mc.subcommunityoutreach_btn.enabled = false;
        subsponsors_mc.subcurrentsponsors_btn.enabled = false;
        subsponsors_mc.subbecomeasponsor_btn.enabled = false;
        submedia_mc.subpictures_btn.enabled = false;
        submedia_mc.subpromovideo_btn.enabled = false;
        submedia_mc.subanimations_btn.enabled = false;
        submedia_mc.subnewsletter_btn.enabled = false;
        submembers_mc.subforums_btn.enabled = false;
        submembers_mc.subscholarships_btn.enabled = false;
        submembers_mc.subtutoringlist_btn.enabled = false;
        submembers_mc.subsampleletter_btn.enabled = false;
        submembers_mc.subpermissionslips_btn.enabled = false;
        submembers_mc.cmembers_btn.enabled = false;
        subabout_mc._alpha = 0;
        subsponsors_mc._alpha = 0;
        submedia_mc._alpha = 0;
        submembers_mc._alpha = 0;
        subabout_mc._y = startYabout;
        subsponsors_mc._y = startYsponsors;
        submedia_mc._y = startYmedia;
        submembers_mc._y = startYmembers;
        first_popup._alpha = 100;
        first_popup.play();
        subfirst_mc.subsummary_btn.enabled = true;
        subfirst_mc.sublinks_btn.enabled = true;
        subfirst_mc.game2008_btn.enabled = true;
        subfirst_mc._alpha = 100;
        first_fade = new Tween(subfirst_mc,"_alpha",Regular.easeOut,0,100,3,false)
        first_topmove = new Tween(subfirst_mc,"_y",Regular.easeOut,startYfirst,startYfirst-35,3,false)
    }
}

game_btn.onRollOver = function () {
    if(game_popup._alpha == 0) {
        home_popup._alpha = 0;
        about_popup._alpha = 0;
        first_popup._alpha = 0;
        sponsors_popup._alpha = 0;
        media_popup._alpha = 0;
        members_popup._alpha = 0;
        contactus_popup._alpha = 0;
        home_popup.gotoAndStop(1);
        about_popup.gotoAndStop(1);
        first_popup.gotoAndStop(1);
        sponsors_popup.gotoAndStop(1);
        media_popup.gotoAndStop(1);
        members_popup.gotoAndStop(1);
        contactus_popup.gotoAndStop(1);
        subabout_mc.subhistory_btn.enabled = false;
        subabout_mc.subbranches_btn.enabled = false;
        subabout_mc.subawards_btn.enabled = false;
        subabout_mc.subcommunityoutreach_btn.enabled = false;
        subfirst_mc.game2008_btn.enabled = false;
        subfirst_mc.subsummary_btn.enabled = false;
        subfirst_mc.sublinks_btn.enabled = false;
        subsponsors_mc.subcurrentsponsors_btn.enabled = false;
        subsponsors_mc.subbecomeasponsor_btn.enabled = false;
        submedia_mc.subpictures_btn.enabled = false;
        submedia_mc.subpromovideo_btn.enabled = false;
        submedia_mc.subanimations_btn.enabled = false;
        submedia_mc.subnewsletter_btn.enabled = false;
        submembers_mc.subforums_btn.enabled = false;
        submembers_mc.subscholarships_btn.enabled = false;
        submembers_mc.subtutoringlist_btn.enabled = false;
        submembers_mc.subsampleletter_btn.enabled = false;
        submembers_mc.subpermissionslips_btn.enabled = false;
        submembers_mc.cmembers_btn.enabled = false;
        subabout_mc._alpha = 0;
        subfirst_mc._alpha = 0;
        subsponsors_mc._alpha = 0;
        submedia_mc._alpha = 0;
        submembers_mc._alpha = 0;
        subabout_mc._y = startYabout;
        subfirst_mc._y = startYfirst;
        subsponsors_mc._y = startYsponsors;
        submedia_mc._y = startYmedia;
        submembers_mc._y = startYmembers;
        game_popup._alpha = 100;
        game_popup.play();
    }
}

sponsors_btn.onRollOver = function () {
    if(sponsors_popup._alpha == 0) {
        home_popup._alpha = 0;
        about_popup._alpha = 0;
        first_popup._alpha = 0;
        game_popup._alpha = 0;
        media_popup._alpha = 0;
        members_popup._alpha = 0;
        contactus_popup._alpha = 0;
        home_popup.gotoAndStop(1);
        about_popup.gotoAndStop(1);
        first_popup.gotoAndStop(1);
        game_popup.gotoAndStop(1);
        media_popup.gotoAndStop(1);
        members_popup.gotoAndStop(1);
        contactus_popup.gotoAndStop(1);
        subabout_mc.subhistory_btn.enabled = false;
        subabout_mc.subbranches_btn.enabled = false;
        subabout_mc.subawards_btn.enabled = false;
        subabout_mc.subcommunityoutreach_btn.enabled = false;
        subfirst_mc.game2008_btn.enabled = false;
        subfirst_mc.subsummary_btn.enabled = false;
        subfirst_mc.sublinks_btn.enabled = false;
        submedia_mc.subpictures_btn.enabled = false;
        submedia_mc.subpromovideo_btn.enabled = false;
        submedia_mc.subanimations_btn.enabled = false;
        submedia_mc.subnewsletter_btn.enabled = false;
        submembers_mc.subforums_btn.enabled = false;
        submembers_mc.subscholarships_btn.enabled = false;
        submembers_mc.subtutoringlist_btn.enabled = false;
        submembers_mc.subsampleletter_btn.enabled = false;
        submembers_mc.subpermissionslips_btn.enabled = false;
        submembers_mc.cmembers_btn.enabled = false;
        subabout_mc._alpha = 0;
        subfirst_mc._alpha = 0;
        submedia_mc._alpha = 0;
        submembers_mc._alpha = 0;
        subabout_mc._y = startYabout;
        subfirst_mc._y = startYfirst;
        submedia_mc._y = startYmedia;
        submembers_mc._y = startYmembers;
        sponsors_popup._alpha = 100;
        sponsors_popup.play();
        subsponsors_mc.subcurrentsponsors_btn.enabled = true;
        subsponsors_mc.subbecomeasponsor_btn.enabled = true;
        sponsors_fade = new Tween(subsponsors_mc,"_alpha",Regular.easeOut,0,100,3,false)
        sponsors_topmove = new Tween(subsponsors_mc,"_y",Regular.easeOut,startYsponsors,startYsponsors-35,3,false)
    }
}

media_btn.onRollOver = function () {
    if(media_popup._alpha == 0) {
        home_popup._alpha = 0;
        about_popup._alpha = 0;
        first_popup._alpha = 0;
        game_popup._alpha = 0;
        sponsors_popup._alpha = 0;
        members_popup._alpha = 0;
        contactus_popup._alpha = 0;
        home_popup.gotoAndStop(1);
        about_popup.gotoAndStop(1);
        first_popup.gotoAndStop(1);
        game_popup.gotoAndStop(1);
        sponsors_popup.gotoAndStop(1);
        members_popup.gotoAndStop(1);
        contactus_popup.gotoAndStop(1);
        subabout_mc.subhistory_btn.enabled = false;
        subabout_mc.subbranches_btn.enabled = false;
        subabout_mc.subawards_btn.enabled = false;
        subabout_mc.subcommunityoutreach_btn.enabled = false;
        subfirst_mc.game2008_btn.enabled = false;
        subfirst_mc.subsummary_btn.enabled = false;
        subfirst_mc.sublinks_btn.enabled = false;
        subsponsors_mc.subcurrentsponsors_btn.enabled = false;
        subsponsors_mc.subbecomeasponsor_btn.enabled = false;
        submembers_mc.subforums_btn.enabled = false;
        submembers_mc.subscholarships_btn.enabled = false;
        submembers_mc.subtutoringlist_btn.enabled = false;
        submembers_mc.subsampleletter_btn.enabled = false;
        submembers_mc.subpermissionslips_btn.enabled = false;
        submembers_mc.cmembers_btn.enabled = false;
        subabout_mc._alpha = 0;
        subfirst_mc._alpha = 0;
        subsponsors_mc._alpha = 0;
        submembers_mc._alpha = 0;
        subabout_mc._y = startYabout;
        subfirst_mc._y = startYfirst;
        subsponsors_mc._y = startYsponsors;
        submembers_mc._y = startYmembers;
        media_popup._alpha = 100;
        media_popup.play();
        submedia_mc.subpictures_btn.enabled = true;
        submedia_mc.subpromovideo_btn.enabled = true;
        submedia_mc.subanimations_btn.enabled = true;
        submedia_mc.subnewsletter_btn.enabled = true;
        submedia_mc._alpha = 100;
        media_fade = new Tween(submedia_mc,"_alpha",Regular.easeOut,0,100,3,false)
        media_topmove = new Tween(submedia_mc,"_y",Regular.easeOut,startYmedia,startYmedia-35,3,false)
    }
}

members_btn.onRollOver = function () {
    if(members_popup._alpha == 0) {
        home_popup._alpha = 0;
        about_popup._alpha = 0;
        first_popup._alpha = 0;
        game_popup._alpha = 0;
        sponsors_popup._alpha = 0;
        media_popup._alpha = 0;
        contactus_popup._alpha = 0;
        home_popup.gotoAndStop(1);
        about_popup.gotoAndStop(1);
        first_popup.gotoAndStop(1);
        game_popup.gotoAndStop(1);
        sponsors_popup.gotoAndStop(1);
        media_popup.gotoAndStop(1);
        contactus_popup.gotoAndStop(1);
        subabout_mc.subhistory_btn.enabled = false;
        subabout_mc.subbranches_btn.enabled = false;
        subabout_mc.subawards_btn.enabled = false;
        subabout_mc.subcommunityoutreach_btn.enabled = false;
        subfirst_mc.game2008_btn.enabled = false;
        subfirst_mc.subsummary_btn.enabled = false;
        subfirst_mc.sublinks_btn.enabled = false;
        subsponsors_mc.subcurrentsponsors_btn.enabled = false;
        subsponsors_mc.subbecomeasponsor_btn.enabled = false;
        submedia_mc.subpictures_btn.enabled = false;
        submedia_mc.subpromovideo_btn.enabled = false;
        submedia_mc.subanimations_btn.enabled = false;
        submedia_mc.subnewsletter_btn.enabled = false;
        subabout_mc._alpha = 0;
        subfirst_mc._alpha = 0;
        subsponsors_mc._alpha = 0;
        submedia_mc._alpha = 0;
        subabout_mc._y = startYabout;
        subfirst_mc._y = startYfirst;
        subsponsors_mc._y = startYsponsors;
        submedia_mc._y = startYmedia;
        members_popup._alpha = 100;
        members_popup.play();
        submembers_mc.subforums_btn.enabled = true;
        submembers_mc.subscholarships_btn.enabled = true;
        submembers_mc.subtutoringlist_btn.enabled = true;
        submembers_mc.subsampleletter_btn.enabled = false;
        submembers_mc.subpermissionslips_btn.enabled = true;
        submembers_mc.cmembers_btn.enabled = true;
        submembers_mc._alpha = 100;
        members_fade = new Tween(submembers_mc,"_alpha",Regular.easeOut,0,100,3,false)
        members_topmove = new Tween(submembers_mc,"_y",Regular.easeOut,startYmembers,startYmembers-35,3,false)
    }
}

contactus_btn.onRollOver = function () {
    if(contactus_popup._alpha == 0) {
        home_popup._alpha = 0;
        about_popup._alpha = 0;
        first_popup._alpha = 0;
        game_popup._alpha = 0;
        sponsors_popup._alpha = 0;
        media_popup._alpha = 0;
        members_popup._alpha = 0;
        home_popup.gotoAndStop(1);
        about_popup.gotoAndStop(1);
        first_popup.gotoAndStop(1);
        game_popup.gotoAndStop(1);
        sponsors_popup.gotoAndStop(1);
        media_popup.gotoAndStop(1);
        members_popup.gotoAndStop(1);
        subabout_mc.subhistory_btn.enabled = false;
        subabout_mc.subbranches_btn.enabled = false;
        subabout_mc.subawards_btn.enabled = false;
        subabout_mc.subcommunityoutreach_btn.enabled = false;
        subfirst_mc.game2008_btn.enabled = false;
        subfirst_mc.subsummary_btn.enabled = false;
        subfirst_mc.sublinks_btn.enabled = false;
        subsponsors_mc.subcurrentsponsors_btn.enabled = false;
        subsponsors_mc.subbecomeasponsor_btn.enabled = false;
        submedia_mc.subpictures_btn.enabled = false;
        submedia_mc.subpromovideo_btn.enabled = false;
        submedia_mc.subanimations_btn.enabled = false;
        submedia_mc.subnewsletter_btn.enabled = false;
        submembers_mc.subforums_btn.enabled = false;
        submembers_mc.subscholarships_btn.enabled = false;
        submembers_mc.subtutoringlist_btn.enabled = false;
        submembers_mc.subsampleletter_btn.enabled = false;
        submembers_mc.subpermissionslips_btn.enabled = false;
        submembers_mc.cmembers_btn.enabled = false;
        subabout_mc._alpha = 0;
        subfirst_mc._alpha = 0;
        subsponsors_mc._alpha = 0;
        submedia_mc._alpha = 0;
        submembers_mc._alpha = 0;
        subabout_mc._y = startYabout;
        subfirst_mc._y = startYfirst;
        subsponsors_mc._y = startYsponsors;
        submedia_mc._y = startYmedia;
        submembers_mc._y = startYmembers;
        contactus_popup._alpha = 100;
        contactus_popup.play();
    }
}
  1. import mx.transitions.Tween;
  2. import mx.transitions.easing.*;
  3. var subbernumber:Number = 1;
  4. var startYabout:Number = subabout_mc._y;
  5. var startYfirst:Number = subfirst_mc._y;
  6. var startYsponsors:Number = subsponsors_mc._y;
  7. var startYmedia:Number = submedia_mc._y;
  8. var startYmembers:Number = submembers_mc._y;
  9. var about_fade:Tween;
  10. var about_topmove:Tween;
  11. var first_fade:Tween;
  12. var first_topmove:Tween;
  13. var sponsors_fade:Tween;
  14. var sponsors_topmove:Tween;
  15. var media_fade:Tween;
  16. var media_topmove:Tween;
  17. var members_fade:Tween;
  18. var members_topmove:Tween;
  19. subabout_mc.subhistory_btn.enabled = false;
  20. subabout_mc.subbranches_btn.enabled = false;
  21. subabout_mc.subawards_btn.enabled = false;
  22. subabout_mc.subcommunityoutreach_btn.enabled = false;
  23. subfirst_mc.game2008_btn.enabled = false;
  24. subfirst_mc.subsummary_btn.enabled = false;
  25. subfirst_mc.sublinks_btn.enabled = false;
  26. subsponsors_mc.subcurrentsponsors_btn.enabled = false;
  27. subsponsors_mc.subbecomeasponsor_btn.enabled = false;
  28. submedia_mc.subpictures_btn.enabled = false;
  29. submedia_mc.subpromovideo_btn.enabled = false;
  30. submedia_mc.subanimations_btn.enabled = false;
  31. submedia_mc.subnewsletter_btn.enabled = false;
  32. submembers_mc.subforums_btn.enabled = false;
  33. submembers_mc.subscholarships_btn.enabled = false;
  34. submembers_mc.subtutoringlist_btn.enabled = false;
  35. submembers_mc.subsampleletter_btn.enabled = false;
  36. submembers_mc.subpermissionslips_btn.enabled = false;
  37. submembers_mc.cmembers_btn.enabled = false;
  38. home_btn.onRollOver = function () {
  39.     if(home_popup._alpha == 0) {
  40.         about_popup._alpha = 0;
  41.         first_popup._alpha = 0;
  42.         game_popup._alpha = 0;
  43.         sponsors_popup._alpha = 0;
  44.         media_popup._alpha = 0;
  45.         members_popup._alpha = 0;
  46.         contactus_popup._alpha = 0;
  47.         first_popup.gotoAndStop(1);
  48.         about_popup.gotoAndStop(1);
  49.         game_popup.gotoAndStop(1);
  50.         sponsors_popup.gotoAndStop(1);
  51.         media_popup.gotoAndStop(1);
  52.         members_popup.gotoAndStop(1);
  53.         contactus_popup.gotoAndStop(1);
  54.         subabout_mc.subhistory_btn.enabled = false;
  55.         subabout_mc.subbranches_btn.enabled = false;
  56.         subabout_mc.subawards_btn.enabled = false;
  57.         subabout_mc.subcommunityoutreach_btn.enabled = false;
  58.         subfirst_mc.game2008_btn.enabled = false;
  59.         subfirst_mc.subsummary_btn.enabled = false;
  60.         subfirst_mc.sublinks_btn.enabled = false;
  61.         subsponsors_mc.subcurrentsponsors_btn.enabled = false;
  62.         subsponsors_mc.subbecomeasponsor_btn.enabled = false;
  63.         submedia_mc.subpictures_btn.enabled = false;
  64.         submedia_mc.subpromovideo_btn.enabled = false;
  65.         submedia_mc.subanimations_btn.enabled = false;
  66.         submembers_mc.subforums_btn.enabled = false;
  67.         submembers_mc.subscholarships_btn.enabled = false;
  68.         submembers_mc.subtutoringlist_btn.enabled = false;
  69.         submembers_mc.subsampleletter_btn.enabled = false;
  70.         submembers_mc.subpermissionslips_btn.enabled = false;
  71.         submembers_mc.cmembers_btn.enabled = false;
  72.         subabout_mc._alpha = 0;
  73.         subfirst_mc._alpha = 0;
  74.         subsponsors_mc._alpha = 0;
  75.         submedia_mc._alpha = 0;
  76.         submembers_mc._alpha = 0;
  77.         subabout_mc._y = startYabout;
  78.         subfirst_mc._y = startYfirst;
  79.         subsponsors_mc._y = startYsponsors;
  80.         submedia_mc._y = startYmedia;
  81.         home_popup._alpha = 100;
  82.         home_popup.play();
  83.     }
  84. }
  85. about_btn.onRollOver = function () {
  86.     if(about_popup._alpha == 0) {
  87.         home_popup._alpha = 0;
  88.         first_popup._alpha = 0;
  89.         game_popup._alpha = 0;
  90.         sponsors_popup._alpha = 0;
  91.         media_popup._alpha = 0;
  92.         members_popup._alpha = 0;
  93.         contactus_popup._alpha = 0;
  94.         home_popup.gotoAndStop(1);
  95.         first_popup.gotoAndStop(1);
  96.         game_popup.gotoAndStop(1);
  97.         sponsors_popup.gotoAndStop(1);
  98.         media_popup.gotoAndStop(1);
  99.         members_popup.gotoAndStop(1);
  100.         contactus_popup.gotoAndStop(1);
  101.         subfirst_mc.game2008_btn.enabled = false;
  102.         subfirst_mc.subsummary_btn.enabled = false;
  103.         subfirst_mc.sublinks_btn.enabled = false;
  104.         subsponsors_mc.subcurrentsponsors_btn.enabled = false;
  105.         subsponsors_mc.subbecomeasponsor_btn.enabled = false;
  106.         submedia_mc.subpictures_btn.enabled = false;
  107.         submedia_mc.subpromovideo_btn.enabled = false;
  108.         submedia_mc.subanimations_btn.enabled = false;
  109.         submembers_mc.subforums_btn.enabled = false;
  110.         submembers_mc.subscholarships_btn.enabled = false;
  111.         submembers_mc.subtutoringlist_btn.enabled = false;
  112.         submembers_mc.subsampleletter_btn.enabled = false;
  113.         submembers_mc.subpermissionslips_btn.enabled = false;
  114.         submembers_mc.cmembers_btn.enabled = false;
  115.         subfirst_mc._alpha = 0;
  116.         subsponsors_mc._alpha = 0;
  117.         submedia_mc._alpha = 0;
  118.         submembers_mc._alpha = 0;
  119.         subfirst_mc._y = startYfirst;
  120.         subsponsors_mc._y = startYsponsors;
  121.         submedia_mc._y = startYmedia;
  122.         submembers_mc._y = startYmembers;
  123.         about_popup._alpha = 100;
  124.         about_popup.play();
  125.         subabout_mc.subhistory_btn.enabled = true;
  126.         subabout_mc.subbranches_btn.enabled = true;
  127.         subabout_mc.subawards_btn.enabled = true;
  128.         subabout_mc.subcommunityoutreach_btn.enabled = true;
  129.         subabout_mc._alpha = 100;
  130.         about_fade = new Tween(subabout_mc,"_alpha",Regular.easeOut,0,100,3,false)
  131.         about_topmove = new Tween(subabout_mc,"_y",Regular.easeOut,startYabout,startYabout-35,3,false)
  132.     }
  133. }
  134. first_btn.onRollOver = function () {
  135.     if(first_popup._alpha == 0) {
  136.         home_popup._alpha = 0;
  137.         about_popup._alpha = 0;
  138.         game_popup._alpha = 0;
  139.         sponsors_popup._alpha = 0;
  140.         media_popup._alpha = 0;
  141.         members_popup._alpha = 0;
  142.         contactus_popup._alpha = 0;
  143.         home_popup.gotoAndStop(1);
  144.         about_popup.gotoAndStop(1);
  145.         game_popup.gotoAndStop(1);
  146.         sponsors_popup.gotoAndStop(1);
  147.         media_popup.gotoAndStop(1);
  148.         members_popup.gotoAndStop(1);
  149.         contactus_popup.gotoAndStop(1);
  150.         subabout_mc.subhistory_btn.enabled = false;
  151.         subabout_mc.subbranches_btn.enabled = false;
  152.         subabout_mc.subawards_btn.enabled = false;
  153.         subabout_mc.subcommunityoutreach_btn.enabled = false;
  154.         subsponsors_mc.subcurrentsponsors_btn.enabled = false;
  155.         subsponsors_mc.subbecomeasponsor_btn.enabled = false;
  156.         submedia_mc.subpictures_btn.enabled = false;
  157.         submedia_mc.subpromovideo_btn.enabled = false;
  158.         submedia_mc.subanimations_btn.enabled = false;
  159.         submedia_mc.subnewsletter_btn.enabled = false;
  160.         submembers_mc.subforums_btn.enabled = false;
  161.         submembers_mc.subscholarships_btn.enabled = false;
  162.         submembers_mc.subtutoringlist_btn.enabled = false;
  163.         submembers_mc.subsampleletter_btn.enabled = false;
  164.         submembers_mc.subpermissionslips_btn.enabled = false;
  165.         submembers_mc.cmembers_btn.enabled = false;
  166.         subabout_mc._alpha = 0;
  167.         subsponsors_mc._alpha = 0;
  168.         submedia_mc._alpha = 0;
  169.         submembers_mc._alpha = 0;
  170.         subabout_mc._y = startYabout;
  171.         subsponsors_mc._y = startYsponsors;
  172.         submedia_mc._y = startYmedia;
  173.         submembers_mc._y = startYmembers;
  174.         first_popup._alpha = 100;
  175.         first_popup.play();
  176.         subfirst_mc.subsummary_btn.enabled = true;
  177.         subfirst_mc.sublinks_btn.enabled = true;
  178.         subfirst_mc.game2008_btn.enabled = true;
  179.         subfirst_mc._alpha = 100;
  180.         first_fade = new Tween(subfirst_mc,"_alpha",Regular.easeOut,0,100,3,false)
  181.         first_topmove = new Tween(subfirst_mc,"_y",Regular.easeOut,startYfirst,startYfirst-35,3,false)
  182.     }
  183. }
  184. game_btn.onRollOver = function () {
  185.     if(game_popup._alpha == 0) {
  186.         home_popup._alpha = 0;
  187.         about_popup._alpha = 0;
  188.         first_popup._alpha = 0;
  189.         sponsors_popup._alpha = 0;
  190.         media_popup._alpha = 0;
  191.         members_popup._alpha = 0;
  192.         contactus_popup._alpha = 0;
  193.         home_popup.gotoAndStop(1);
  194.         about_popup.gotoAndStop(1);
  195.         first_popup.gotoAndStop(1);
  196.         sponsors_popup.gotoAndStop(1);
  197.         media_popup.gotoAndStop(1);
  198.         members_popup.gotoAndStop(1);
  199.         contactus_popup.gotoAndStop(1);
  200.         subabout_mc.subhistory_btn.enabled = false;
  201.         subabout_mc.subbranches_btn.enabled = false;
  202.         subabout_mc.subawards_btn.enabled = false;
  203.         subabout_mc.subcommunityoutreach_btn.enabled = false;
  204.         subfirst_mc.game2008_btn.enabled = false;
  205.         subfirst_mc.subsummary_btn.enabled = false;
  206.         subfirst_mc.sublinks_btn.enabled = false;
  207.         subsponsors_mc.subcurrentsponsors_btn.enabled = false;
  208.         subsponsors_mc.subbecomeasponsor_btn.enabled = false;
  209.         submedia_mc.subpictures_btn.enabled = false;
  210.         submedia_mc.subpromovideo_btn.enabled = false;
  211.         submedia_mc.subanimations_btn.enabled = false;
  212.         submedia_mc.subnewsletter_btn.enabled = false;
  213.         submembers_mc.subforums_btn.enabled = false;
  214.         submembers_mc.subscholarships_btn.enabled = false;
  215.         submembers_mc.subtutoringlist_btn.enabled = false;
  216.         submembers_mc.subsampleletter_btn.enabled = false;
  217.         submembers_mc.subpermissionslips_btn.enabled = false;
  218.         submembers_mc.cmembers_btn.enabled = false;
  219.         subabout_mc._alpha = 0;
  220.         subfirst_mc._alpha = 0;
  221.         subsponsors_mc._alpha = 0;
  222.         submedia_mc._alpha = 0;
  223.         submembers_mc._alpha = 0;
  224.         subabout_mc._y = startYabout;
  225.         subfirst_mc._y = startYfirst;
  226.         subsponsors_mc._y = startYsponsors;
  227.         submedia_mc._y = startYmedia;
  228.         submembers_mc._y = startYmembers;
  229.         game_popup._alpha = 100;
  230.         game_popup.play();
  231.     }
  232. }
  233. sponsors_btn.onRollOver = function () {
  234.     if(sponsors_popup._alpha == 0) {
  235.         home_popup._alpha = 0;
  236.         about_popup._alpha = 0;
  237.         first_popup._alpha = 0;
  238.         game_popup._alpha = 0;
  239.         media_popup._alpha = 0;
  240.         members_popup._alpha = 0;
  241.         contactus_popup._alpha = 0;
  242.         home_popup.gotoAndStop(1);
  243.         about_popup.gotoAndStop(1);
  244.         first_popup.gotoAndStop(1);
  245.         game_popup.gotoAndStop(1);
  246.         media_popup.gotoAndStop(1);
  247.         members_popup.gotoAndStop(1);
  248.         contactus_popup.gotoAndStop(1);
  249.         subabout_mc.subhistory_btn.enabled = false;
  250.         subabout_mc.subbranches_btn.enabled = false;
  251.         subabout_mc.subawards_btn.enabled = false;
  252.         subabout_mc.subcommunityoutreach_btn.enabled = false;
  253.         subfirst_mc.game2008_btn.enabled = false;
  254.         subfirst_mc.subsummary_btn.enabled = false;
  255.         subfirst_mc.sublinks_btn.enabled = false;
  256.         submedia_mc.subpictures_btn.enabled = false;
  257.         submedia_mc.subpromovideo_btn.enabled = false;
  258.         submedia_mc.subanimations_btn.enabled = false;
  259.         submedia_mc.subnewsletter_btn.enabled = false;
  260.         submembers_mc.subforums_btn.enabled = false;
  261.         submembers_mc.subscholarships_btn.enabled = false;
  262.         submembers_mc.subtutoringlist_btn.enabled = false;
  263.         submembers_mc.subsampleletter_btn.enabled = false;
  264.         submembers_mc.subpermissionslips_btn.enabled = false;
  265.         submembers_mc.cmembers_btn.enabled = false;
  266.         subabout_mc._alpha = 0;
  267.         subfirst_mc._alpha = 0;
  268.         submedia_mc._alpha = 0;
  269.         submembers_mc._alpha = 0;
  270.         subabout_mc._y = startYabout;
  271.         subfirst_mc._y = startYfirst;
  272.         submedia_mc._y = startYmedia;
  273.         submembers_mc._y = startYmembers;
  274.         sponsors_popup._alpha = 100;
  275.         sponsors_popup.play();
  276.         subsponsors_mc.subcurrentsponsors_btn.enabled = true;
  277.         subsponsors_mc.subbecomeasponsor_btn.enabled = true;
  278.         sponsors_fade = new Tween(subsponsors_mc,"_alpha",Regular.easeOut,0,100,3,false)
  279.         sponsors_topmove = new Tween(subsponsors_mc,"_y",Regular.easeOut,startYsponsors,startYsponsors-35,3,false)
  280.     }
  281. }
  282. media_btn.onRollOver = function () {
  283.     if(media_popup._alpha == 0) {
  284.         home_popup._alpha = 0;
  285.         about_popup._alpha = 0;
  286.         first_popup._alpha = 0;
  287.         game_popup._alpha = 0;
  288.         sponsors_popup._alpha = 0;
  289.         members_popup._alpha = 0;
  290.         contactus_popup._alpha = 0;
  291.         home_popup.gotoAndStop(1);
  292.         about_popup.gotoAndStop(1);
  293.         first_popup.gotoAndStop(1);
  294.         game_popup.gotoAndStop(1);
  295.         sponsors_popup.gotoAndStop(1);
  296.         members_popup.gotoAndStop(1);
  297.         contactus_popup.gotoAndStop(1);
  298.         subabout_mc.subhistory_btn.enabled = false;
  299.         subabout_mc.subbranches_btn.enabled = false;
  300.         subabout_mc.subawards_btn.enabled = false;
  301.         subabout_mc.subcommunityoutreach_btn.enabled = false;
  302.         subfirst_mc.game2008_btn.enabled = false;
  303.         subfirst_mc.subsummary_btn.enabled = false;
  304.         subfirst_mc.sublinks_btn.enabled = false;
  305.         subsponsors_mc.subcurrentsponsors_btn.enabled = false;
  306.         subsponsors_mc.subbecomeasponsor_btn.enabled = false;
  307.         submembers_mc.subforums_btn.enabled = false;
  308.         submembers_mc.subscholarships_btn.enabled = false;
  309.         submembers_mc.subtutoringlist_btn.enabled = false;
  310.         submembers_mc.subsampleletter_btn.enabled = false;
  311.         submembers_mc.subpermissionslips_btn.enabled = false;
  312.         submembers_mc.cmembers_btn.enabled = false;
  313.         subabout_mc._alpha = 0;
  314.         subfirst_mc._alpha = 0;
  315.         subsponsors_mc._alpha = 0;
  316.         submembers_mc._alpha = 0;
  317.         subabout_mc._y = startYabout;
  318.         subfirst_mc._y = startYfirst;
  319.         subsponsors_mc._y = startYsponsors;
  320.         submembers_mc._y = startYmembers;
  321.         media_popup._alpha = 100;
  322.         media_popup.play();
  323.         submedia_mc.subpictures_btn.enabled = true;
  324.         submedia_mc.subpromovideo_btn.enabled = true;
  325.         submedia_mc.subanimations_btn.enabled = true;
  326.         submedia_mc.subnewsletter_btn.enabled = true;
  327.         submedia_mc._alpha = 100;
  328.         media_fade = new Tween(submedia_mc,"_alpha",Regular.easeOut,0,100,3,false)
  329.         media_topmove = new Tween(submedia_mc,"_y",Regular.easeOut,startYmedia,startYmedia-35,3,false)
  330.     }
  331. }
  332. members_btn.onRollOver = function () {
  333.     if(members_popup._alpha == 0) {
  334.         home_popup._alpha = 0;
  335.         about_popup._alpha = 0;
  336.         first_popup._alpha = 0;
  337.         game_popup._alpha = 0;
  338.         sponsors_popup._alpha = 0;
  339.         media_popup._alpha = 0;
  340.         contactus_popup._alpha = 0;
  341.         home_popup.gotoAndStop(1);
  342.         about_popup.gotoAndStop(1);
  343.         first_popup.gotoAndStop(1);
  344.         game_popup.gotoAndStop(1);
  345.         sponsors_popup.gotoAndStop(1);
  346.         media_popup.gotoAndStop(1);
  347.         contactus_popup.gotoAndStop(1);
  348.         subabout_mc.subhistory_btn.enabled = false;
  349.         subabout_mc.subbranches_btn.enabled = false;
  350.         subabout_mc.subawards_btn.enabled = false;
  351.         subabout_mc.subcommunityoutreach_btn.enabled = false;
  352.         subfirst_mc.game2008_btn.enabled = false;
  353.         subfirst_mc.subsummary_btn.enabled = false;
  354.         subfirst_mc.sublinks_btn.enabled = false;
  355.         subsponsors_mc.subcurrentsponsors_btn.enabled = false;
  356.         subsponsors_mc.subbecomeasponsor_btn.enabled = false;
  357.         submedia_mc.subpictures_btn.enabled = false;
  358.         submedia_mc.subpromovideo_btn.enabled = false;
  359.         submedia_mc.subanimations_btn.enabled = false;
  360.         submedia_mc.subnewsletter_btn.enabled = false;
  361.         subabout_mc._alpha = 0;
  362.         subfirst_mc._alpha = 0;
  363.         subsponsors_mc._alpha = 0;
  364.         submedia_mc._alpha = 0;
  365.         subabout_mc._y = startYabout;
  366.         subfirst_mc._y = startYfirst;
  367.         subsponsors_mc._y = startYsponsors;
  368.         submedia_mc._y = startYmedia;
  369.         members_popup._alpha = 100;
  370.         members_popup.play();
  371.         submembers_mc.subforums_btn.enabled = true;
  372.         submembers_mc.subscholarships_btn.enabled = true;
  373.         submembers_mc.subtutoringlist_btn.enabled = true;
  374.         submembers_mc.subsampleletter_btn.enabled = false;
  375.         submembers_mc.subpermissionslips_btn.enabled = true;
  376.         submembers_mc.cmembers_btn.enabled = true;
  377.         submembers_mc._alpha = 100;
  378.         members_fade = new Tween(submembers_mc,"_alpha",Regular.easeOut,0,100,3,false)
  379.         members_topmove = new Tween(submembers_mc,"_y",Regular.easeOut,startYmembers,startYmembers-35,3,false)
  380.     }
  381. }
  382. contactus_btn.onRollOver = function () {
  383.     if(contactus_popup._alpha == 0) {
  384.         home_popup._alpha = 0;
  385.         about_popup._alpha = 0;
  386.         first_popup._alpha = 0;
  387.         game_popup._alpha = 0;
  388.         sponsors_popup._alpha = 0;
  389.         media_popup._alpha = 0;
  390.         members_popup._alpha = 0;
  391.         home_popup.gotoAndStop(1);
  392.         about_popup.gotoAndStop(1);
  393.         first_popup.gotoAndStop(1);
  394.         game_popup.gotoAndStop(1);
  395.         sponsors_popup.gotoAndStop(1);
  396.         media_popup.gotoAndStop(1);
  397.         members_popup.gotoAndStop(1);
  398.         subabout_mc.subhistory_btn.enabled = false;
  399.         subabout_mc.subbranches_btn.enabled = false;
  400.         subabout_mc.subawards_btn.enabled = false;
  401.         subabout_mc.subcommunityoutreach_btn.enabled = false;
  402.         subfirst_mc.game2008_btn.enabled = false;
  403.         subfirst_mc.subsummary_btn.enabled = false;
  404.         subfirst_mc.sublinks_btn.enabled = false;
  405.         subsponsors_mc.subcurrentsponsors_btn.enabled = false;
  406.         subsponsors_mc.subbecomeasponsor_btn.enabled = false;
  407.         submedia_mc.subpictures_btn.enabled = false;
  408.         submedia_mc.subpromovideo_btn.enabled = false;
  409.         submedia_mc.subanimations_btn.enabled = false;
  410.         submedia_mc.subnewsletter_btn.enabled = false;
  411.         submembers_mc.subforums_btn.enabled = false;
  412.         submembers_mc.subscholarships_btn.enabled = false;
  413.         submembers_mc.subtutoringlist_btn.enabled = false;
  414.         submembers_mc.subsampleletter_btn.enabled = false;
  415.         submembers_mc.subpermissionslips_btn.enabled = false;
  416.         submembers_mc.cmembers_btn.enabled = false;
  417.         subabout_mc._alpha = 0;
  418.         subfirst_mc._alpha = 0;
  419.         subsponsors_mc._alpha = 0;
  420.         submedia_mc._alpha = 0;
  421.         submembers_mc._alpha = 0;
  422.         subabout_mc._y = startYabout;
  423.         subfirst_mc._y = startYfirst;
  424.         subsponsors_mc._y = startYsponsors;
  425.         submedia_mc._y = startYmedia;
  426.         submembers_mc._y = startYmembers;
  427.         contactus_popup._alpha = 100;
  428.         contactus_popup.play();
  429.     }
  430. }


I know its 400 lines. [/url]
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Jaw
  • Graduate
  • Graduate
  • User avatar
  • Posts: 132
  • Loc: Minneapolis, MN

Post 3+ Months Ago

Wow.... first off 'Yikes' That is a ton of code. You would be better off using a listener on each button to do the job. I know you are thinking 'yes, but I've already written 400 lines of code.' Well trust me it will be easier if you let the buttons figure out which one is or is not clicked.

Here is a link that will help you along...
Kirupa - ASBroadcaster

Also if you are setting multiple variables/properties to one specific number you can trail them out.

For example...
Code: [ Select ]
first_popup._alpha = game_popup._alpha = sponsors_popup._alpha = 0;


Good luck.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 8 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.