1 Reply Latest reply on Aug 3, 2007 11:25 AM by kglad

    movie clips inside an animated movieclip

      Hello- I have been trying to get movieclip buttons inside an action script animated movie clip to work and have no luck doing so. The inside movieclips act as if they dont have over or out states; but when i comment out the animation, they work fine... here is my code- (Please note im am a newbe at action script so any suggestions on improving current code will be greatly appreciated)

      stop();

      import mx.transitions.Tween;
      import mx.transitions.easing.*;

      function upFunction() {
      var xPosT:Tween = new Tween(kText, "_x", Strong.easeOut, kText._x, 400, 1, true);
      }
      function downFunction() {
      var xPosT:Tween = new Tween(kText, "_x", Strong.easeOut, kText._x, 200, 1, true);
      }

      kText.btn.onRelease = function():Void {
      _root.play();
      };
      kText.onRollOver = function():Void {
      upFunction();
      kText.useHandCursor = false;
      };
      kText.onRollOut = function():Void {
      downFunction();
      };


      kText is the animated movieclip, btn is the button inside kText

      Thanks!
        • 1. Re: movie clips inside an animated movieclip
          kglad Adobe Community Professional & MVP
          if you define any mouse handlers for a parent movieclip (like kText) it will intercept all mouse events so child movieclips (like kText.btn) do not see the mouse events.

          to remedy define all mouse handlers for shapes (converted to movieclips), buttons and movieclips on kText's timeline or use a loop with hitTest one the parent or child