1. Trang chủ
  2. » Công Nghệ Thông Tin

Adobe Flash chuyên nghiệp - p 29 ppsx

10 246 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 5,35 MB

Nội dung

ptg adobe fLash professionaL Cs5 CLassroom in a book 271 3 e font used in the selected text box appears on the left side of the dialog box (Times New Roman Bold). In the Character ranges section, select Uppercase, Lowercase, Numerals, and Punctuation. Click OK. e character ranges that you’ve selected will be embedded in the final SWF file. Any of the characters in those ranges will display properly in your final Flash movie. 4 Select the first linked text box named description_txt. 5 In the Character section of the Properties inspector, click the Embed button. e Font Embedding dialog box appears. e Numerals for Character range should already be selected since you embedded those characters for the Mortgage Calculator. 6 In the Character ranges section, select Uppercase, Lowercase, and Punctuation in addition to Numerals. Click OK. e character ranges that you’ve selected will be embedded in the final SWF file. Any of the characters in those ranges will display properly in your final Flash movie. Download from Library of Wow! ebook ptg 272 LESSON 7 Using Text Loading and displaying external text Information for a second property listing is saved in three additional text files in the 07Start folder. You’ll add ActionScript to your movie that loads information from those text files. 1 Open the file in the 07Start folder called 07SampleRealEstate2-address.txt. e file contains information about the address of another property listing. 2 Choose Window > Code Snippets. e Code Snippets panel appears. 3 Expand the Load and Unload folder and double-click the Load External Text option. A new layer named Actions is automatically inserted in the Timeline, and the Actions panel opens to display the inserted code snippet. You’ll have to customize some of the code for it to work for this particular project.  Note: Make sure you save external text content as a text-only file in an application such as SimpleText (Mac) or Notepad (Windows). Do not use Microsoft Word, because Word adds unnecessary additional information to the file that interferes with its proper loading. If you use Word, always choose Save As Text Only. Download from Library of Wow! ebook ptg adobe fLash professionaL Cs5 CLassroom in a book 273 4 Replace the URL in line 12 of the code snippet with the filename of the property address, 07SampleRealEstate2-address.txt. Make sure you keep the double quotation marks surrounding the filename. e code loads the file 07SampleRealEstate2-address.txt. 5 Replace the trace command in line 19 of the code snippet with the following code that assigns the new text to the text box named address_txt: address_txt.text = textData; e contents of the text file, 07SampleRealEstate2-address.txt, will be displayed in the text box named address_txt. 6 In the Code Snippets panel, double-click the Load External Text option again. 7 A second code snippet appears in the Actions panel that loads a second text file. Download from Library of Wow! ebook ptg 274 LESSON 7 Using Text 8 Replace the URL in line 34 with the filename of the property details, 07SampleRealEstate2-info.txt, and replace the trace command in line 41 with the following code that assigns the new text to the text box named info_txt: info_txt.text = textData; 9 In the Code Snippets panel, double-click the Load External Text option a third time and make the code replacements to load 07SampleRealEstate2-description. txt and display the text in description_txt. e three large blocks of code snippets appear in the Actions panel one after the other. Download from Library of Wow! ebook ptg adobe fLash professionaL Cs5 CLassroom in a book 275 10 Choose Control > Test Movie > in Flash Professional. Flash loads the three external text files and displays the contents of the text files in the targeted text boxes. e listing now displays details for a property on Cobble Hill Way instead of 7 th Avenue. e photos and Mortgage Calculator still refer to the previous listing, so the update to the new property is unfinished. However, you can still see in this incomplete example how flexible it is to develop a framework that loads external text content and displays it in text boxes on the Stage. Many professional Flash projects rely on dynamic content fed from external assets such as text files. Download from Library of Wow! ebook ptg 276 LESSON 7 Using Text Review Questions 1 What is the extra SWZ file that is required for TLF Text? 2 What is the difference between Read Only, Selectable, and Editable TLF Text? 3 When do you need to embed fonts, and how do you do it? 4 How do you make text wrap around objects in a layout? 5 How do you change or read the contents of a text box? Review Answers 1 e SWZ file is an external ActionScript library that contains information that supports TLF Text. If your Flash movie contains TLF Text, it needs the SWZ file to function properly. Flash automatically generates the additional file, which should always accompany your SWF file. 2 Read Only text is for display purposes and doesn’t allow the user to select or edit the text. Selectable text allows the user to select and copy text. Editable text allows the user to select, copy, delete, and edit the text. e contents of all three kinds of text can be changed dynamically with ActionScript. 3 Fonts should be embedded for any text that may be edited or changed at runtime, which means any Editable text box or any text box whose contents dynamically changes, except for text that uses device fonts. Choose Text > Font Embedding or click the Embed button in the Properties inspector to display the Font Embedding dialog box. In the Font Embedding dialog box, you can choose which font, style, and range of characters to embed in your Flash movie. 4 You can wrap text around objects such as photos or graphic elements in a layout by creating a series of linked text boxes, sometimes called threaded text containers. e links establish how overflow text from one text box flows into the next text box. Create the first text box, and then click on the small white box in its lower-right corner. After the mouse cursor changes to a text box icon, click and drag to add the next linked text box. 5 A text box’s contents are determined by its text property, which accepts String values. To change or access the contents of a text box, you must first give the text box an instance name in the Properties inspector. en, in ActionScript, you can reference the contents of the text box with its instance name, followed by a dot, followed by the keyword text. Download from Library of Wow! ebook ptg This page intentionally left blank Download from Library of Wow! ebook ptg 278 8 WORKING WITH SOUND AND VIDEO Lesson Overview In this lesson, you’ll learn how to do the following: • Import sound files • Edit sound files • Use Adobe Media Encoder CS5 • Understand video and audio encoding options • Play external video from your Flash project • Customize options on the video playback component • Create and use cue points • Work with video that contains alpha channels • Embed video in your Flash project is lesson will take approximately three hours to complete. If needed, remove the previous lesson folder from your hard drive and copy the Lesson08 folder onto it. Download from Library of Wow! ebook ptg 279 Sound and video add new dimensions to your projects. Import sound fi les and edit them directly in Flash, and use Adobe Media Encoder to compress and convert video fi les to use in Flash. Download from Library of Wow! ebook ptg 280 LESSON 8 Working with Sound and Video Getting Started Start the lesson by viewing the finished animated zoo kiosk. You’ll create the kiosk by adding sound and video files to a project in Flash. 1 Double-click the 08End.swf file in the Lesson08/08End folder to play the animation. View the movie of the polar bear with a short soundtrack of an African beat. A zoo director introduces himself, and as he speaks, Flash elements appear that are synchronized with his talk. 2 Click a sound button to hear an animal sound. 3 Click a thumbnail button to view a short movie about the animal. Use the interface controls below the movie to pause, continue, or lower the volume. In this lesson, you’ll import audio files and put them on the Timeline to provide the short audio flourish. You’ll also learn how to embed sounds in each button. You’ll use Adobe Media Encoder CS5 to compress and convert the video files to the appropriate format for Flash. You’ll learn how to work with transparent back- grounds in video to create the silhouetted zoo director video. You’ll also add cue points in the video of the zoo director to trigger other Flash animated elements. 1 Double-click the 08Start.fla file in the Lesson08/08Start folder to open the initial project file in Flash. 2 Choose File > Save As. Name the file 08_workingcopy.fla, and save it in the 08Start folder. Saving a working copy ensures that the original start file will be available if you want to start over. Download from Library of Wow! ebook . address of another property listing. 2 Choose Window > Code Snippets. e Code Snippets panel appears. 3 Expand the Load and Unload folder and double-click the Load External Text option. A new layer. 07SampleRealEstate2-address.txt, will be displayed in the text box named address_txt. 6 In the Code Snippets panel, double-click the Load External Text option again. 7 A second code snippet appears. description_txt. e three large blocks of code snippets appear in the Actions panel one after the other. Download from Library of Wow! ebook ptg adobe fLash professionaL Cs5 CLassroom in a book 275 10

Ngày đăng: 06/07/2014, 18:20

TỪ KHÓA LIÊN QUAN

w