Jul
26
2008

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

The MovieClip object has a property called currentLabel that returs an array. Iteratntg through the table we can get frame numbers from .frame and frame names from .name property.

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 

 
+1 #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

I'm with Adobe - Facebook group