A function is a variable that determines the value of another variable by a certain rule, and the corresponding relationship is called a function.
A function is a method by which a value is defined to produce another value based on an artificial operation. Functions are also used in Flash, and six types of functions are defined, as follows:
General guntions function Eval (varible) Gets the value of a variable
True to get logical "true" values
False to get logical "false" value
NewLine Create a new line
Gettimer Get Time
second, the numerical class function (Numeric funtion) int (number) An integer that evaluates an object's value
Random (number) randomly produces an integer value within an object value
Three, String class functions (String funtion)
Substring (String,index,count) The substring in the target string
Length (string) to calculate the lengths of the target string
CHR (Asciicode) converts the target value to the corresponding character as an ASCII code
ORD (character) converts the target character to an ASCII value
Property class function (properties) GetProperty (target,property) Gets the specified properties of the target object
x coordinate position of the-X object
Y-coordinate position of the-Y object
Width of-width Object
Height of-heigth Object
Rotation of-rotation objects
The target path of the-target object
-name the name of the target reference object
URL address of the-url object
-xscale the scaling on the X axis of the object
Scaling in the y-axis direction of the-yscale object
-currentframe Get current frame position
-totalframe gets all of the frames on the timeline
-frameloaded returns a numeric value of 0100 specifying the progress of the animated work being transferred.
-alpha gets the ratio of the alpha channel of the object (transparency of the object)
-visible gets whether the object is visible
-droptarget gets the drag-and-drop property of the object
v. Global properties function -hightquality settings in the work of the anti-aliasing processing
-focusrect the button to set whether the cursor prompts
-soundbuftime sets the buffer time to play when the sound is played
six, multibyte String functions (multibyte string function) Mbsubstring (String,index,count)
Gets the substring in the destination multibyte string
Mblength (String) to calculate the length of the destination multibyte string
MB/CHR (Asciicode) converts the target value to the corresponding multibyte character as an ASCII code
Mbord (character) converts a target multibyte character to an ASCII value
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.