Flash CS4 ActionScript 3.0 Tutorial
How to Label Frames with Names and Visual Reminders in Flash
Frame Labels are great organization tools. The labels are placed on a separate layer (usually the upper-most layer) and provide the programmer with words to describe the current location on the timeline.
Labels can also be used by ActionScript to send the user to a specific label in the timeline. It is good practice to stick to camel case naming conventions when naming labels. For more information on camel case, see topic, Variables. Be careful not to place any objects or other content on the Labels layer.
In a new Flash document, name the default layer Labels.
Click frame 10 of the Labels layer and press F5. Then click the keyframe at frame 1.
Open the Properties panel (Cmd/F3 (PC - Ctrl/F3) and add the word intro in the Name box, then press Return (PC - Enter).
The new label displays on the timeline.
To change a frame label, click on the label keyframe, enter a different word in the label Name text box, then press Return (PC - Enter).
Displaying Current Label in Text Field
To display the current label (i.e., home) in a Dynamic text field with an instance name of labelText_txt, you would use the following code:
//home would display