Get frame number from label AS3

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:

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑