【正文】
h it using the File Publish mand. This creates a pressed version of your file with the extension .swf. You can then play the SWF file in a web browser or as a standalone application using Flash Player. What you can do with Flash With the wide array of features in Flash, you can create many types of applications. The following are some examples of the kinds of applications Flash is capable of generating: Animations These include banner ads, online greeting cards, cartoons, and so on. Many other types of Flash applications include animation elements as well. Games Many games are built with Flash. Games usually bine the animation capabilities of Flash with the logic capabilities of ActionScript. User interfaces Many website designers use Flash to design user interfaces. These include simple navigation bars as well as much more plex interfaces. Flexible messaging areas These are areas in web pages that designers use for displaying information that may change over time. A flexible messaging area (FMA) on a restaurant website might display information about each day’ s menu specials. Rich Inter applications These include a wide spectrum of applications that provide a rich user interface for displaying and manipulating remotely stored data over the Inter. A rich Inter application could be a calendar application, a pricefinding application, a shopping catalog, an education and testing application, or any other application that presents remote data with a graphically rich interface. Depending on your project and your working style, you may use these steps in a different order. As you bee familiar with Flash and its workflows, you will discover a style of working that suits you best. About ActionScript and events In Macromedia Flash Basic 8 and Macromedia Flash Professional 8, ActionScript code is executed when an event occurs: for example, when a movie clip is loaded, when a keyframe on the Timeline is entered, or when the user clicks a button. Events can be triggered either by the user or by the system. Users click mouse buttons and press keys。 動(dòng)作 面板和 腳本 窗口都具有 腳本 窗格(在其中鍵入代碼)和 動(dòng)作 工具箱。您應(yīng)該轉(zhuǎn)而通過調(diào)用駐留在一個(gè)中心位置的函數(shù)來響應(yīng)事件。還可以使用組件(預(yù)構(gòu)建的影片剪輯)共享代碼和功能,例如 UI 元素和腳本。隨著項(xiàng)目的擴(kuò)展,這種簡(jiǎn)便性帶來的好處將超出您的想像。常見的做法是創(chuàng)建一個(gè)名為動(dòng)作 的圖層,并將 ActionScript 代碼放置在該圖層上。另外,這還會(huì)導(dǎo)致難于在不同的 Flash 應(yīng)用程序之間共享代碼。 將 SWF 文件停止在特定的關(guān)鍵幀后,您需要執(zhí)行某種動(dòng)作。附加到幀上的腳本稱為幀腳本。例如,可 以在用戶進(jìn)入場(chǎng)景時(shí)將外部 SWF 文件或 JPG 圖像加載到影片剪輯中,或允許用戶使用移動(dòng)鼠標(biāo)的方法在場(chǎng)景中調(diào)整元素的位置。 5 鼠標(biāo)和鍵盤事件 用戶與 SWF 文件或應(yīng)用程序交互時(shí)觸發(fā)鼠標(biāo)和鍵盤事件。用戶單擊鼠 標(biāo)按鈕或按鍵;在滿足特定條件或進(jìn)程完成( SWF 文件加載、時(shí)間軸到達(dá)特定的幀、圖形完成下載等)時(shí),系統(tǒng)會(huì)觸發(fā)相關(guān)事件。 根據(jù)您的項(xiàng)目和工作方式,您可以按不同的順序使用上述步驟。 靈活消息區(qū)域 設(shè)計(jì)人員使用 web 頁中的這些區(qū)域顯示可能會(huì)不斷變化的信息。 游戲 許多游戲都是使用 Flash 構(gòu)建的。然后,就可以使用 Flash Player 在 Web 瀏覽器中播放 SWF 文件,或者將其作為獨(dú)立的應(yīng)用程序進(jìn)行播放。 Flash 包含了許多種功能,如預(yù)置的拖放用戶界面組件,可以輕松地將 ActionScript 添加到文檔的內(nèi)置行為,以及可以添加到媒體對(duì)象的特殊效果。例如,可以添加代碼以便用戶在單擊某按鈕時(shí)顯示一幅新圖像,還可以使用 ActionScript 向應(yīng)用程序添加邏輯。 時(shí)間軸 用來通知 Flash 顯示圖形和其它項(xiàng)目元素的時(shí)間,也可以使用時(shí)間軸指定舞臺(tái)上各圖形的分層順序。接下來,定義如何以及何時(shí)使用各個(gè)元素來創(chuàng)建設(shè)想中的應(yīng)用程序。Flash 是通過廣泛使用 矢量圖形 做到這一點(diǎn)的。 Flash 可以包含簡(jiǎn)單的動(dòng)畫、視頻內(nèi)容、復(fù)雜演示文稿和應(yīng)用程序以及介于它們之間的任何內(nèi)容。 Flash 不僅能使學(xué)習(xí)者加深對(duì)所學(xué)知識(shí)的理解,提高學(xué)生的學(xué)習(xí)興趣和教師的教學(xué)效率,同時(shí)也能為課件增加生動(dòng)的藝術(shù)效果,有助于學(xué)科知識(shí)的表達(dá)和傳播。為了為學(xué)生提供直觀的實(shí)驗(yàn)過程,提高學(xué)生的學(xué)習(xí)效率, Flash 動(dòng)畫在教學(xué)中的應(yīng)用十分必要。通常,使用 Flash 創(chuàng)作的各個(gè)內(nèi)容單元稱為 應(yīng)用程序 ,即使它們可能只是很簡(jiǎn)單的動(dòng)畫。與位圖圖形相比,矢量圖形需要的內(nèi)存和存儲(chǔ)空間小很多,因?yàn)樗鼈兪且詳?shù)學(xué)公式而不是大型數(shù)據(jù)集來表示的。 在 Flash 中創(chuàng)作內(nèi)容時(shí),需要在 Flash 文檔文件中工作。位于較高圖層中的圖形顯示在較低圖層中的圖形的上方。邏輯使應(yīng)用程序能夠根據(jù)