# Create button action subject to a given frame range

**URL:** <https://forum.kirupa.com/t/create-button-action-subject-to-a-given-frame-range/182406>\
**Category:** flash\
**Created:** [March 17, 2006, 8:27pm UTC](https://forum.kirupa.com/t/create-button-action-subject-to-a-given-frame-range/182406 "2006-03-17T20:27:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mizztah](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mizztah](https://forum.kirupa.com/u/mizztah)\
**Post date:** [March 17, 2006, 8:27pm UTC](https://forum.kirupa.com/t/create-button-action-subject-to-a-given-frame-range/182406/1 "2006-03-17T20:27:44Z")

</div>

Hi

I have created a movie which have a set of simple navigation buttons which I would like to be able to start playing the movie from a series of labelled frames going to each label dependent on the position in the timeline?

For example if I have a label at frame 1(start\_1) and a label at frame 50(start\_50) and so on every 50 frames for a set time, what is the best way to code the button to tell it to return to start\_1 before it has reached frame 50 or tell it to return to start\_50 on reaching frames 51 to 100 and so on, in the timeline.

I gather that I can use an if else statement but how do I set variables to timeline frame positions to which the button will we act in the correct manner?

Alternatively is there a better(smarter) way to do this? :h:

any help, prodding in a general direction is appreciated

Mizztah
