currentlabel and currentlabels
Posted: September 26th, 2007 | Author: Ivan Valadares | Filed under: Actionscript3, Code, Tutorial | No Comments »currentLabel and currentLabels were a great improvement in flash. About 1 year ago I had a project with lots of characters animations, and as you know sometimes working with designers is not easy. The problem was that I had to run functions when the characters where doing some actions and some of those actions were not controlled by me, there were just embedded in the timeline. If all the animations where equal, like jump in frame 10 I could use the currentframe propriety, but they were not. That work was a really mess, but now with the help of those properties is easy.
On the next example:
Using currentLabels propriety we associated labels to functions, so when the playhead passes throw some label, the respective function is called.
We use currentLabel like a state variable that tells what is the current action of the animation.
The movieClip:
![]()
The code: