Flashæ˜¯ä¸€ä¸ªäº¤äº’å¼çš„åŠ¨ç”»èŠ‚ç›®ï¼Œä½†ä¸åƒåŠ¨ç”»ï¼Œæ·»åŠ äº¤äº’æ‰‹æ®µä½¿äº‹æƒ…å‘ç”Ÿåœ¨ç”µå½±ä¸ä¸€æ ·åˆ›å»ºçš„é“¾æŽ¥ï¼Œä½¿ä½ çš„è§‚ä¼—å¯ä»¥æŽ¢ç´¢æ‚¨çš„ç”µå½±ï¼ŒéŸ³é¢‘æˆ–è§†é¢‘æŽ§åˆ¶ï¼Œæˆ–å½“ä½ çš„ç”µå½±å…·æœ‰ä¸€å®šçš„äº‹ä»¶è§¦å‘ï¼Œè¾¾åˆ°æŸä¸€ç‚¹ã€‚
é—ªå˜ç§°ä¸ºActionScriptçš„ä¸œè¥¿å¤„ç†çš„äº’åŠ¨æ€§ã€‚ ActionScriptæ˜¯Flashçš„æœ¬åœ°è„šæœ¬è¯è¨€ï¼Œå®ƒå…è®¸å¼€å‘äººå‘˜åˆ›å»ºé«˜åº¦äº’åŠ¨çš„ç”µå½±ã€‚é—ªå…‰ç¯ä¸ºæˆ‘ä»¬æä¾›äº†å¤šç§æ–¹å¼ä»Žä¸€ä¸ªç®€å•çš„æŒ‡å‘å’Œç‚¹å‡»ç•Œé¢ï¼ˆæˆ‘ä»¬å¯è§†åŒ–è®¾è®¡å™¨ç±»åž‹ï¼‰ä½¿ç”¨ActionScriptè„šæœ¬æ¨¡å¼ï¼ˆç¨‹åºå‘˜ä¹¡äº²ï¼‰ã€‚æ‰€ä»¥ï¼Œæ¢å¥è¯è¯´ï¼ŒFlashå°†è®©æ‚¨ä½¿ç”¨ActionScriptå·¥ä½œçš„æ–¹å¼ï¼Œä¸ºä½ çš„ä½œå“ã€‚
In this short tutorial, we'll take a look at a few basic efficiency techniques when working with ActionScript. Before we go any further though, make sure you've created a symbol and dropped an instance of the symbol onto the Stage. Also, make sure you've given the symbol instance a name at the top of the Properties panel.
Also, it's considered best practices for Flash developers to create a separate layer in the Timeline for their ActionScript -- in other words, keeping the ActionScript isolated from all the other content in their movie. So, go ahead and create a new layer and name it Actions.
You certainly don't have to hand-code your ActionScript. The Code Snippets panel provides pre-created bits of ActionScript that are ready to be applied to your movies. Pop open the panel by choosing Window > Code Snippets.
ä¸€æ—¦ä½ æœ‰ä¸€äº›â€œåŠ¨ä½œâ€é¢æ¿å†…å‘ç”Ÿçš„åŠ¨ä½œï¼Œä½ å¯ä»¥è°ƒæ•´ä½ çš„ä»£ç çš„å„ä¸ªç»„æˆéƒ¨åˆ†ï¼Œé€šè¿‡ä½¿ç”¨è„šæœ¬è¾…åŠ©ã€‚åœ¨â€œåŠ¨ä½œâ€é¢æ¿çš„å³ä¸Šè§’ï¼Œ å•å‡»â€œè„šæœ¬åŠ©æ‰‹ â€æŒ‰é’®ï¼ˆâ€œé”æ–â€å›¾æ ‡ï¼‰ã€‚æŽ¥ä¸‹æ¥ï¼ŒæŒ‰ä¸€ä¸‹å†…
Across the top of the Actions panel, you'll find a row of very handy icons and commands, starting off with the Add Actions menu. Use the menu whenever you'd like to add items to your script. In fact, you can either use the menu at the top or you can always use the column of ActionScript elements on the left side of the Actions panel, too. This area is called the Actions Toolbox. Either way, you can easily add onto your script in a fast and easy way -- sure beats hand coding!