# Understanding the currentframe concept

**URL:** <https://forum.kirupa.com/t/understanding-the-currentframe-concept/90623>\
**Category:** flash\
**Created:** [May 19, 2005, 9:35am UTC](https://forum.kirupa.com/t/understanding-the-currentframe-concept/90623 "2005-05-19T09:35:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaintedSwan](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@PaintedSwan](https://forum.kirupa.com/u/PaintedSwan)\
**Post date:** [May 19, 2005, 9:35am UTC](https://forum.kirupa.com/t/understanding-the-currentframe-concept/90623/1 "2005-05-19T09:35:26Z")

</div>

Hello all. 🙂 I’m quite new to actionscript, so I’m still learning the basic concepts. Attached to a movieclip used as a button I have this actionscript:

[AS] on (release) {  
if (\_parent.leaf1.scriptdisable != true) {  
\_parent.leaf1.scriptdisable = true;  
\_parent.leaf1.gotoAndPlay(“normal1”);  
\_parent.leaf1.rewind = true;  
\_parent.vinefade.rewind = false;  
\_parent.vinefade.gotoAndPlay(“1”);  
unloadMovie(\_parent.artween\_mc);  
this.enabled = false;  
}  
if (\_parent.leaf9.\_currentframe\<73) {  
\_parent.leaf9.nextFrame();

}  
if (\_parent.leaf9.\_currentframe\>=73) {  
\_parent.linkstween\_mc.\_visible = true;  
\_parent.hit9button.enabled = true;

}

}[/AS]

Which basically causes the movieclips ‘leaf1’ to shrink, ‘vinefade’ to go to its first frame, ‘artween\_mc’ to unload, and for all other commands on this button to be disabled. I also want it to check another movieclip called ‘leaf9’, and see if it’s current frame is at less than a particular frame number (73), because if so I want it to start playing forward. Once it reaches this frame number (73), I want to cause linkstween\_mc to become visible and hit9button (also a movieclip) to become enabled. My current script does absolutely nothing to leaf9, so if anyone could point out my error I would be most grateful. 🙂 Thanks.
