function getFrameByLabel(yourMovieClip:MovieClip, 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; }
Src: http://stackoverflow.com/questions/4846858/as3-simple-way-to-get-the-frame-number-of-a-frame-label
Tech Reference: AS3
Leave a Reply