A Glimpse at the New Timeline Controls in AS3

With all the changes that came with ActionScript 3.0, a few new Timeline properties were introduced with the hope that any Flash animator, designer or developer would come to appreciate. The lack of exact control or knowledge of where you area on the Timeline or scene gets a bit irritating when you do not want to stick with static frame numbers.

For example, let’s say you want to know the amount of labels within a specific MovieClip or simply would like to find out what the name of the last label of a specific MovieClip is. In ActionScript 2.0, this would be damn near impossible.

Within ActionScript 3.0, there are a few more properties you can tap into that will allow you to have more control over the Timeline. Also, not knowing where you are in relation to a frame label along with not knowing what frame number your labels reside on are a thing of the past. Thank god!

Below are examples of these new Timeline properties.

Return the current label within a MovieClip

AS3 Code: Current Label

Return a list of all the labels within a MovieClip

AS Code Currentlabels

Return a frame label’s frame number and name

</p>

Check how many labels are within a MovieClip

AS3 Code Current Length

Determine what the last frame label of a specific MovieClip is

AS3 Code Array Pop

Check the frame number of where a frame label resides

AS3 Get Frame Number

Conclusion:

There are many creative ways to put these new AS3 Timeline properties to to work for you.  How you plan to do so is up to you.  Personally, I am relieved to know that they will be there to serve me when their number is called.

For more info on this topic, check out Adobe’s documentation on the new AS3 Timeline properties.