1 Reply Latest reply on Jul 15, 2006 8:55 PM by Charles Parcell

    Getting the name of a MC and assigning it to a var

    Nickname339966
      I'm learning to program on my own and trying to figure out how to get the name of the MC assigned to a variable, whenever the mouse/cursor is over that specific MC.

      var dot = dotSF;
      var city = city_sanfrancisco;

      //rollover function
      dot.onRollOver=function(){
      fade="in";
      }
      dot.onRollOut=function(){
      fade="out";
      }

      //onEnterFrame keeps checking for alpha value of MC to fade images
      _root.onEnterFrame=function(){
      switch(fade){
      case "in":
      city._alpha +=20;
      if (city._alpha > 100){
      city._alpha = 100;
      }
      break;
      case "out":
      city._alpha -=20;
      if (city._alpha < 0){
      city._alpha = 0;
      }
      break;
      }
      }

      "dot" is a MC on a map; when i mouseover dot, another MC fades in to show more details. Each dot represents a city... I don't know how to get the name of the dot MC when I mouseover it so that I can get the corresponding city details displayed.

      BTW, the fade/in/out function is something i found somewhere else. Looked pretty easy to use, but if you have suggestions, that'd be great too.

      David