3 Replies Latest reply on Dec 3, 2009 3:19 PM by kglad

    Weird movie view behavior

    frist44

      I have a movie, that dynamically is changing size and given a dropshadow via:

       

      _root.btn_ccselfhelp.onRollOver = function(){
          highlightAnimation(cc_sm_selfhelp_pic, resizeScale);   
      }

      _root.btn_ccselfhelp.onRollOut = function(){
          highlightAnimation(cc_sm_selfhelp_pic, 100);
      }

       

      function highlightAnimation(obj:Object, xscale) {
         
          // If scale is larger than current object scale
          if (obj._xscale < xscale) {
             
              // Move to front
              moveToFront(obj);
             
              // Add drop shadow
              cc_sm_selfhelp_pic.filters = [myDropShadowFilter];   
             
              //Increase size of movie       
              obj.onEnterFrame=function(){
                  obj._xscale += resizeConstant;
                  obj._yscale += resizeConstant;
             
                  if(obj._xscale == xscale) {
                      delete obj.onEnterFrame;           
                  }
              }
          }
          // If scale is smaller than current object scale
          else {
              obj.filters = undefined;
              obj.onEnterFrame=function(){
                  obj._xscale -= resizeConstant;
                  obj._yscale -= resizeConstant;
                 
                  if(obj._xscale == xscale) {
                      delete obj.onEnterFrame;
                  }
              }
          }
      }

       

      function moveToFront(obj:Object) {
          obj.swapDepths(obj._parent.getNextHighestDepth());
      }

       

      However, I also have a little next button that will move along to the next slide. If i trigger the highlightAnimation function of a particular picture, when I proceed to the next frame using:

       

      _root.next.onPress = function(){
          gotoAndStop("operations");
      }

       

      The movies are still visible even though they're not in the frame. If i click the next button without triggering that function, they disappear as usual.

       

      Any idea why?