tailieunhanh - Flash: ActionScript Language Reference- P3

Tham khảo tài liệu 'flash: actionscript language reference- p3', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | case Availability Flash Player 4. Usage case expression statement s Parameters expression Any expression. statement s Any statement or sequence of statements. Returns Nothing. Description Statement defines a condition for the switch statement. If the expression parameter equals the expression parameter of the switch statement using strict equality then Flash Player will execute statements in the statement s parameter until it encounters a break statement or the end of the switch statement. If you use the case statement outside a switch statement it produces an error and the script doesn t compile. Note You should always end the statement s parameter with a break statement. If you omit the break statement from the statement s parameter it continues executing with the next case statement instead of exiting the switch statement. Example The following example defines conditions for the switch statement thisMonth. If thisMonth equals the expression in the case statement the statement executes. var thisMonth Number new Date .getMonth switch thisMonth case 0 trace January break case 1 trace February break case 5 case 6 case 7 trace Some summer month break case 8 trace September break default trace some other month case 201 See also break default strict equality switch 202 Chapter 2 ActionScript Language Reference class Availability Flash Player 6. Usage dynamic class className extends superClass implements interfaceName interfaceName. class definition here Note To use this keyword you must specify ActionScript and Flash Player 6 or later in the Flash tab of your FLA file s Publish Settings dialog box. This keyword is supported only when used in external script files-not in scripts written in the Actions panel. Parameters className The fully qualified name of the class. superClass The name of the class that className extends inherits from . This parameter is optional. interfaceName The name of the interface whose methods className must implement. This parameter is .

TỪ KHÓA LIÊN QUAN