Jul
26
2008

Getting a list of frames and frame names in the Movie Clip

Movie Clip has property called currentLabel that returs an array. We only need to iterate through the table getting frame numbers from .frame and frame names from .name.

1
2
3
4
5
6
var frameList:Array = myClip.currentLabels;
 
for (var i:int=0; i<frameList.length; i++)
{
   trace ("Frame no: " + frameList[i].frame+" has name: " + frameList[i].name);
}

 

Don't forget to import flash.display.FrameLabel.



Comments 

 
0 #2 rajneesh 2010-02-06 06:50
this one is interesting
can be handy
Quote
 
 
0 #1 sigman 2009-10-31 20:50
Nice!
Quote
 

AS3 Tips