Download Lingo Dictionary
Transcript
The origin point can be set with floating-point precision using the separate originH and originV properties, or it can be set with integer precision using the single originPoint property. You can set the originV property only if the originMode property is set to #point. This property can be tested and set. The default value is 0. Note: This property must be set to the default value if the scaleMode property is set to #autoSize, or the sprite does not display correctly. Example This sprite script uses the originMode property to set up a Flash movie sprite so its origin point can be set to a specific point. It then sets the horizontal and vertical origin points. on beginSprite me sprite(me.spriteNum).scaleMode = #showAll sprite(me.spriteNum).originMode = #point sprite(me.spriteNum).originH = 100 sprite(me.spriteNum).originV = 80 end See also originH, originPoint, scaleMode otherwise Syntax otherwise statement(s) Description Keyword; precedes instructions that Lingo performs when none of the earlier conditions in a case statement are met. This keyword can be used to alert users of out-of-bound input or invalid type, and can be very helpful in debugging during development. Example The following handler tests which key the user pressed most recently and responds accordingly: • If the user pressed A, B, or C, the movie performs the corresponding action following the of keyword. • If the user pressed any other key, the movie executes the statement that follows the otherwise keyword. In this case, the statement is a simple alert. on keyDown case (the key) of "A": go to frame "Apple" "B", "C": puppetTransition 99 go to frame "Oranges" otherwise: alert "That is not a valid key." end case end keyDown 455