示例#1
0
 /**
  * halts the shake action
  */
 public void stopShake()
 {
     _harness.x        = _harness.center.x;
     _harness.y        = _harness.center.y;
     _harness.rotation = _harness.getRotation();
     _juggler.remove(_shaker);
     _shaking = false;
 }
示例#2
0
        public void removeFrame(String _val)
        {
            SMovieClip mTempFrame = null;
            SMovieClip mFrame     = null;

            for (var i = 0; i < mFramesCount; i++)
            {
                mTempFrame = mFrames[i];
                if (mTempFrame.name == _val)
                {
                    mFrame        = mTempFrame;
                    mCurrentFrame = i + 1;
                    break;
                }
            }

            var frameIndex = Convert.ToInt32(_val);

            if (mFrame == null)
            {
                mFrame = mFrames[frameIndex - 1];
            }

            if ((frameIndex) == mCurrentFrame)
            {
                prevFrame();
            }

            if (mFrame != null)
            {
                removeChild(mFrame);
                mJuggler.remove(mFrame);
                mFrames.RemoveRange(frameIndex - 1, 1);
                mFramesCount--;
            }
        }