1. Computing

Getting to Know Flash CS5: What Are ActionScript 3.0 Arguments?

By

Getting to Know Flash CS5: What Are ActionScript 3.0 Arguments?
Getting to Know Flash CS5: What Are ActionScript 3.0 Arguments?
Arguments refer not to disagreements, but for values that are an integral part of many keywords in ActionScripting. While some keywords are used to define or manipulate values, others require additional information so they know what they're supposed to act on - whether they're acting on a symbol, a frame, a label, or some other object on the stage.

The values they act on are arguments, and generally have to be defined by the user. You can think of arguments as pointers, telling the keyword where it's supposed to go before it performs its assigned task.

In the example image above, I've used a gotoAndPlay() command. In this case the command is gotoAndPlay(19); in this case, the number 19 is the argument. It tells the command which frame it's supposed to reach before it plays. The requirements of arguments for each command are usually quite specific; each command has pre-defined values that it requires to operate. You couldn't put the word "earbuds" in the place where the frame number should go in the gotoAndPlay() command.

©2014 About.com. All rights reserved.