troubleshooting Question

Flash MouseDown event not working as expected....

Avatar of unluckynelson
unluckynelsonFlag for South Africa asked on
Web DevelopmentAdobe Flash
6 Comments1 Solution1452 ViewsLast Modified:
Hi All
I have a row of flash buttons that run on RollOver and RollOut and MouseDown events... most of it works fine but when I click on one of the mc's with a totally different name, all the mousedown functions are called... What am I doing wrong?

if (CurrentPage=="home") {
      trace(CurrentPage);
      home_mc.gotoAndStop(4);
} else {
      this.home_mc.onRollOver = function() {
            home_mc.gotoAndStop(2);
            home_mc.home_hover_mc.play();
            trace('Hovering');
      };
      this.home_mc.onMouseDown = function() {
            home_mc.gotoAndPlay(3);
            trace('Home Clicking');
      };
      this.home_mc.onRollOut = function() {
            home_mc.home_hover_mc.play();
      };
}
if (CurrentPage=="products") {
      trace(CurrentPage);
      products_mc.gotoAndStop(4);
} else {
      this.products_mc.onRollOver = function() {
            products_mc.gotoAndStop(2);
            products_mc.products_hover_mc.gotoAndPlay(1);
            trace('Hovering');
      };
      this.products_mc.onMouseDown = function() {
            products_mc.gotoAndPlay(3);
            trace('Clicking');
      };
      this.products_mc.onRollOut = function() {
            products_mc.products_hover_mc.play();
      };
}
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros