3 Replies Latest reply on Jan 3, 2007 8:00 PM by kglad

    Function fall through

    RandalJ99
      I've got a pretty simple action script below which resides in the first frame of the timeline. The problem is that when the movie is executed it immediately executes all the functions despite the fact that I haven't taken any actions to trigger the functions on the movie clip the functions are attached to. It just inexplicably falls through all the functions and executes every line. What is up? I appreciate any help on this one.

      Thanks,

      Randal

      Code:

      var mouseListener:Object = new Object();
      mouseListener.onMouseMove = function() {
      StatusBar_mc._x = _xmouse - 30;
      StatusBar_mc._y = _ymouse - 60;
      updateAfterEvent();
      };
      Mouse.addListener(mouseListener);

      //

      DU_mc.onRollOver = CountyOver('Test','Region');
      DU_mc.onRollOut = CountyOut();
      DU_mc.onRelease = CountyRelease();

      function CountyOver(CountyName:String,CountyRegion:String) {
      trace("CountyOver is called");
      _root.StatusBar_mc._visible=true;
      _root.StatusBar_mc.countyNamePrint.text=CountyName;
      _root.StatusBar_mc.countyPopulationPrint.text=CountyRegion;
      this.gotoAndStop(2);
      };

      function CountyOut() {
      _root.StatusBar_mc._visible=false;
      this.gotoAndStop(1);
      };

      function CountyRelease() {
      _root.DetailBox_mc.gotoAndPlay(2);
      };