2 Replies Latest reply on Jun 27, 2007 12:54 PM by eholz1

    button events (down,hit,etc) do not fire

    eholz1 Level 1
      Hello Flash Forum Members,

      I have found a handy zooming method for flash complements of this site: http://www.gogoat.com/2006/08/07/flash-zoom

      This is pretty nice. I am pretty much a beginner in ActionScript areas, and have a problem with my use of the zoom code from the above link.

      I have the navigation pane on my stage - the actionscript expands the nav pane to the size of the stage, in my case 640x480. The nav pane fills the stage. I attach a movie - and can zoom/pan on the content I load using the attachMovie method. I have also place a button on the stage (it is not in the container that is created to load the movie). I have not yet figured out why the button events will not play (I have a click sound attached to the button). The "over" for the button plays, but the down and hit do not play.

      I know it must have something to do with the "container" and the "mask" which get created at run time.
      Where can I put the button so its events will play??

      here is a snippet of the code I am using:
      //INIT functions
      // vars
      var bPanning:Boolean = false;
      var bPanEnabled:Boolean = true;
      var bZooming:Boolean = false;
      var zoomlevels:Array = new Array(25, 50, 100, 200);
      var currentzoom:Number = 2; // 100%
      var panTweenX:Object, panTweenY:Object;

      // tweens for zoom
      var tween:Object;
      var tween1:Object;
      var tween2:Object;
      var tween3:Object;

      // init size
      resizeTo(Stage.width, Stage.height);

      // create container and mask
      this.createEmptyMovieClip("container",1);
      this.attachMovie("navpane_mask","mask",2);
      //this.attachMove("zoom_mask1", "mask",2);
      container.setMask(mask);
      zoomcontrol.nav = this;
      border.swapDepths(10000);
      zoomcontrol.swapDepths(10001);

      // here you can add content to the container
      container.attachMovie('mc_mag','mc_mag',container.getNextHighestDepth(),
      {_x:100, _y:100});

      stop();

      Thanks

      eholz1