# Reference To Frame Number

**URL:** <https://forum.kirupa.com/t/reference-to-frame-number/241666>\
**Category:** flash\
**Created:** [October 16, 2007, 8:43pm UTC](https://forum.kirupa.com/t/reference-to-frame-number/241666 "2007-10-16T20:43:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sk8er5960](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@sk8er5960](https://forum.kirupa.com/u/sk8er5960)\
**Post date:** [October 16, 2007, 8:43pm UTC](https://forum.kirupa.com/t/reference-to-frame-number/241666/1 "2007-10-16T20:43:09Z")

</div>

Hello All,

Im trying to control a movieClips time line according to what frame this movieClip is in. Im trying:

this.onRollOut = function() {

if ( \_parent.movieClip.currentFrame \< “10”) {  
\_parent.movieClip.gotoAndPlay(20);  
}  
else {  
\_parent.movieClip.play();  
}

It’s a total shot in the dark so i expected it to not work. But can anyone tell me how I can achieve this control??

Its a dropdown menu that appears when a button is rolled over. I want the menu to stay until I roll out, then it goes to an outro animation.

any ideas?
