Implemented enterFrame and exitFrame