Understanding the ActionScript Language > Using Flash MX ActionScript with older versions of Flash > About slash syntax

 

About slash syntax

Slash syntax was used in Flash 3 and 4 to indicate the target path of a movie clip or variable. This syntax is still supported by Flash Player 6, but its use is not recommended. However, if you are creating content intended specifically for Flash Player 4, you need to use slash syntax.

In slash syntax, slashes are used instead of dots; also, to indicate a variable, you precede it with a colon:

myMovieClip/childMovieClip:myVariable

To write the same target path in dot syntax, which is supported by Flash 5 and later, you would use the following code:

myMovieClip.childMovieClip.myVariable

Slash syntax was most commonly used with the tellTarget action, whose use is also no longer recommended. The with action is now preferred over tellTarget because it is more compatible with dot syntax. For detailed information, see tellTarget and with in the ActionScript Dictionary.