# \[mx\] how do you get frame label's number?

**URL:** https://forum.kirupa.com/t/mx-how-do-you-get-frame-labels-number/38254
**Category:** flash
**Created:** [December 20, 2003, 1:23am UTC](https://forum.kirupa.com/t/mx-how-do-you-get-frame-labels-number/38254 "2003-12-20T01:23:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lowprofile](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@lowprofile](https://forum.kirupa.com/u/lowprofile)
#### Post date: [December 20, 2003, 1:23am UTC](https://forum.kirupa.com/t/mx-how-do-you-get-frame-labels-number/38254/1 "2003-12-20T01:23:13Z")

</div>

Hi,

I would like to use a conditional to determine if my location is before or after a frame.

However, to make it portable I would like to base it on the label name.

e.g.

if (\_currentframe \< “p2”)

however, “p2” is the label of a frame.

So how do I get the frame number from the frame label?

I am making something that when it detects a click, jumps to the next point in the movie. These P1,P2, etc. will be distributed  
through the movie.

Does this sound like the best idea?

‘if jump detected’{

if (\_currentframe \< “p2”){  
gotoAndPlay(“p2”);  
} ELSE IF (\_currentframe \< “p3”) {  
gotoAndPlay(“p3”);

I guess the problem with this is what if the one of the movies isn’t as long and doesn’t have a “p4” location for example.

Probably I can handle this case when I am setting up the variables that contain the frame number of “p2”, “p3”, etc… checking agains the max number of frames. Yep.

Thanks
