AS3: Simple way to get the frame number of a frame label
i haven't tested it but the following should work. the labels property of the Scene object is an Array of objects containing both the label & number of the frames.
private function getFrameByLabel( frameLabel: String ):int
{
var scene:Scene = yourMovieClip.currentScene;
var frameNumber:int = -1;
for( var i:int ; i < scene.labels.length ; ++i )
{
if( scene.labels[i].name == frameLabel )
frameNumber = scene.labels[i].frame;
}
return frameNumber;
}
Look at the frame property from the FrameLabel