# mc\_1.gotoAndPlay(mc\_2.\_currentframe)?  AS2/CS4

**URL:** <https://forum.kirupa.com/t/mc-1-gotoandplay-mc-2--currentframe-as2-cs4/284778>\
**Category:** Uncategorized\
**Created:** [March 23, 2009, 4:19pm UTC](https://forum.kirupa.com/t/mc-1-gotoandplay-mc-2--currentframe-as2-cs4/284778 "2009-03-23T16:19:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomph](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@tomph](https://forum.kirupa.com/u/tomph)\
**Post date:** [March 23, 2009, 4:19pm UTC](https://forum.kirupa.com/t/mc-1-gotoandplay-mc-2--currentframe-as2-cs4/284778/1 "2009-03-23T16:19:37Z")

</div>

Right, I’m basically making a animation of someone breathing, with multiple layers. What I want to happen when a user clicks the animation is for it to switch to the next layer seamlessly (skin\>muscles\>skeleton). Each layer has the same 60 frames. For example, if the skin layer’s currentframe was ‘37’ i’d want the muscle layer to start at ‘38’ when clicked.

Below is some of the code I already have. I can trace the currentframe of the original mc, however the attached movieclip refuses to gotoAndPlay to that number?

HELP! ☹

var b:MovieClip = this.breathing\_skin\_btn

this.breathing\_skin\_btn.onPress = function(){  
trace(b.\_currentframe)  
attachMovie(“breathing\_muscle”, “breathing\_muscle\_btn”,1);  
breathing\_muscle\_btn.gotoAndPlay(b.\_currentframe);  
removeMovieClip(“breathing\_skin\_btn”);  
}
