background image

49

CHAPTER 4

Building Your First Application

This chapter provides a tutorial that guides you through the process of creating a simple 
application using some of the authoring features in Macromedia Flash MX 2004 and 
Macromedia Flash MX Professional 2004. A Flash application, broadly defined, can be as simple 
as content that offers interactivity, or as elaborate as a robust application that interacts with a 
variety of data sources. 

In this tutorial, after examining an existing Flash document, you’ll begin by creating a new Flash 
document and end by publishing the application for web playback. The tutorial should take 
approximately 20 minutes to complete.

If you have not already done so, we recommend that before you take this tutorial you read 

Chapter 3, “Getting to Know the Workspace,” on page 21

.

This chapter contains the following sections:

Workflow for building an application  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Examine a completed application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Create a new document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

Add media content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Add navigation controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Add motion and basic interactivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Test the application  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Publish and view the application  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

The next steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Содержание DIRECTOR MX 2004-GETTING STARTED WITH...

Страница 1: ...Getting Started with Flash...

Страница 2: ...his guide then you do so at your own risk Macromedia provides these links only as a convenience and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for...

Страница 3: ...nging or removing Flash Player 19 Configuring a server for Flash Player 19 CHAPTER 3 Getting to Know the Workspace 21 Using the Stage 22 Using the Timeline 23 Using frames and keyframes 26 Using layer...

Страница 4: ...ilding an application 50 Examine a completed application 50 Create a new document 52 Add media content 53 Add navigation controls 56 Add motion and basic interactivity 58 Test the application 59 Publi...

Страница 5: ...lash Player 6 What s new in Flash 6 Guide to instructional media 9 Using the Start page 13 About Flash Flash is an authoring tool that allows you to create anything from a simple animation to a comple...

Страница 6: ...on builders Flash MX Professional 2004 includes all the features of Flash MX 2004 along with several powerful new tools It provides project management tools for optimizing the workflow between the mem...

Страница 7: ...our fingertips in a central page For more information see Using the Start page on page 13 Find and Replace The Find and Replace feature locates and replaces a text string a font a color a symbol a sou...

Страница 8: ...hat a SWF file using nonsecure non HTTPS protocols cannot access content loaded using a secure HTTPS protocol even when both are in exactly the same domain For more information see Flash Player securi...

Страница 9: ...or ActionScript For more information see Chapter 14 Data Integration Flash Professional Only in Using Flash Prebuilt data connectors for Web Services and XML New components allow you to connect to web...

Страница 10: ...document A series of lessons on the How Do I tab offer an introduction to using Flash Refer to the Quick Start Basic Flash and Basic ActionScript lessons Help How Do I Using the Help panel The updata...

Страница 11: ...the Table of Contents you ll find a list of lessons 2 Click a lesson topic to open it To search for a word or phrase in the Help panel 1 Click the Search icon in the Help panel toolbar The Search pan...

Страница 12: ...ily control the size of the display area and where and when the Help panel is displayed For more details about working with panels see Using panels and the Property inspector on page 36 To arrange the...

Страница 13: ...areas Open a Recent Item lets you view your most recent documents 0pen displays the Open File dialog box Create New offers a list of file types from which to choose such as ActionScript or document fo...

Страница 14: ...14 Chapter 1 Getting Started...

Страница 15: ...lash system requirements web page at www macromedia com go sysreqs To install Flash MX 2004 and Flash MX Professional 2004 you must have administrative privileges You must also have administrative pri...

Страница 16: ...process Windows If you have a CD insert it in your CD drive A Flash movie clip plays that guides you through installation choices Note You can also run Install Flash MX 2004 exe to start the Flash mov...

Страница 17: ...g and which one you want to try A dialog box appears indicating that you must restart your computer for the change to take effect Purchasing a Flash edition from trial mode If you re running Flash in...

Страница 18: ...which all use the Roaming Profile configuration folder for user level configuration files Roaming profiles allow network users to automatically store their configuration settings on a network server...

Страница 19: ...tion in Netscape select Help About Plug ins from the browser menu To change or reinstall the plug in for Macintosh Netscape Internet Explorer for Macintosh Safari AOL Opera or CompuServe 1 Close your...

Страница 20: ...ypes Corporate and enterprise system administrators can configure Flash to restrict access by Flash Player to resources in the local file system You can create a security configuration file that limit...

Страница 21: ...23 Using the Timeline 23 Using frames and keyframes 26 Using layers 28 About the main toolbar and edit bar 33 Using the Tools panel 33 Using the grid guides and rulers 34 Using panels and the Property...

Страница 22: ...of your monitor and the document size The minimum value for zooming out on the Stage is 8 The maximum value for zooming in on the Stage is 2000 To magnify or reduce your view of the Stage do one of t...

Страница 23: ...it The Hand tool lets you move the Stage to change the view without having to change the magnification To move the Stage view 1 In the Tools panel select the Hand tool To temporarily switch between an...

Страница 24: ...line on page 27 Changing the appearance of the Timeline By default the Timeline appears at the top of the main application window above the Stage To change its position you can dock the Timeline to th...

Страница 25: ...eline to indicate the current frame displayed on the Stage The Timeline header shows the frame numbers of the animation To display a frame on the Stage you move the playhead to the frame in the Timeli...

Страница 26: ...orms To decrease the height of frame cell rows select Short To turn tinting of frame sequences on or off select Tinted Frames To display thumbnails of the content of each frame scaled to fit the Timel...

Страница 27: ...lect individual frames in the Timeline In span based selection the entire frame sequence from one keyframe to the next is selected when you click any frame in the sequence You can specify span based s...

Страница 28: ...eened sequence drag the beginning or ending keyframe left or right To change the length of a frame by frame sequence see Frame by frame animation in Using Flash To add an item from the library to the...

Страница 29: ...olders As you work you may want to show or hide layers or folders A red X next to the name of a layer or folder indicates that it is hidden When you publish a Flash SWF file any layers that were hidde...

Страница 30: ...lect a new color enter the hexadecimal value for a color or click the Color Picker button and select a color 3 Click OK To change layer height in the Timeline 1 Do one of the following Double click th...

Страница 31: ...ght of the name of a layer or folder to lock it Click in the Lock column again to unlock the layer or folder Click the padlock icon to lock all layers and folders Click it again to unlock all layers a...

Страница 32: ...e a layer or layer folder into a layer folder Drag the layer or layer folder name to the destination layer folder name The layer or layer folder appears inside the destination layer folder in the Time...

Страница 33: ...area contains drawing painting and selection tools The view area contains tools for zooming and panning in the application window The colors area contains modifiers for stroke and fill colors The opt...

Страница 34: ...right corner of the top tool indicates that additional tools are present The same keyboard shortcut functions for all tools in the group 2 Click a tool in the Tools panel graphic or use the arrows to...

Страница 35: ...p tolerance how close objects must be to snap to a guide Draggable guides appear only in the Timeline in which they were created You can clear all the guides in the current editing mode document editi...

Страница 36: ...e in document editing mode all guides in the document are cleared If you are in edit symbols mode only guides used in symbols are cleared Using rulers When rulers are displayed they appear along the t...

Страница 37: ...ct or frame Selecting a frame button or movie clip instance makes the Actions panel active The Actions panel title changes to Button Actions Movie Clip Actions or Frame Actions depending on what is se...

Страница 38: ...can also create new panel groups and dock panels to existing panel groups If you want a panel to appear on its own separated from other panel groups you can float the panel This is particularly useful...

Страница 39: ...ting preferences in Flash Flash lets you set preferences for general application operations editing operations and Clipboard operations See also Specifying drawing settings in Using Flash To set prefe...

Страница 40: ...se Layer Color the default option to use the current layer s outline color For Font Mapping Default select a font to use when substituting missing fonts in documents you open in Flash See Substituting...

Страница 41: ...regardless of the Gradient setting For FreeHand Text select Maintain Text as Blocks to keep text editable in a pasted FreeHand file To set warning preferences select one of the following options Selec...

Страница 42: ...or remove shortcuts from the new set You can delete custom shortcut sets To select a keyboard shortcut set 1 Select Edit Keyboard Shortcuts Windows or Flash Keyboard Shortcuts Macintosh 2 In the Keyb...

Страница 43: ...u select a frame in the Timeline window the context menu contains commands for creating deleting and modifying frames and keyframes Context menus exist for many items and controls in many locations in...

Страница 44: ...ou press the keyboard shortcut again focus moves to the rightmost and highest docked panel Pressing the keyboard shortcut repeatedly then moves the focus through the other docked panels from right to...

Страница 45: ...g the Tab key again will not return the focus to the panel options menu When the options menu has the focus you can press Enter Windows only to display the options menu items In panels that are groupe...

Страница 46: ...ox equivalent to clicking OK Press Escape to close the dialog box without applying the changes equivalent to clicking Cancel When the focus is applied to the Help button press Enter or Spacebar to vie...

Страница 47: ...ld folder of an expanded folder press the Right Arrow key Working with library items using keyboard shortcuts You can cut copy and paste library items using keyboard shortcuts You can cut or copy an i...

Страница 48: ...osh to cut the item or press Control C Windows or Command C Macintosh to copy the item To paste a cut or copied item click on the Stage or in another library to set the insertion point and press Contr...

Страница 49: ...ining an existing Flash document you ll begin by creating a new Flash document and end by publishing the application for web playback The tutorial should take approximately 20 minutes to complete If y...

Страница 50: ...eady for deployment on the web or wherever else you want to publish it Examine a completed application As you examine the finished version of an application you ll create you will also take look at th...

Страница 51: ...Explorer settings to see the folder If you re using a Windows 98 operating system browse to boot drive Windows Application Data Macromedia Flash MX 2004 language Configuration HelpPanel Help GettingS...

Страница 52: ...y 2 View or scroll through the assets in the Library panel 3 When you finish viewing the library assets collapse the panel Close the application To close the document select File Close If you ve made...

Страница 53: ...ck the down arrow on the Background Color box then move the Eyedropper tool over the color swatches to view their hexadecimal values in the Hexadecimal text box 4 Find and click the gray color swatch...

Страница 54: ...utton draw a rectangle around the rectangle you just drew This selects the entire rectangle Now the Property inspector displays settings for a shape You can use the Property inspector to change the li...

Страница 55: ...ing system browse to boot drive Windows Application Data Macromedia Flash MX 2004 language Configuration HelpPanel Help GettingStarted start_files Assets Select logo ai and car png to import If you re...

Страница 56: ...type 14 In the Text fill color box select blue hexadecimal 3366CC Verify that additional settings appear as in the following screen shot 3 Type Don t let your dream car fade away Click here for more...

Страница 57: ...behavior Next you ll add a behavior to the button that will make it open a website Behaviors enable you to add the power control and flexibility of ActionScript coding to your document without having...

Страница 58: ...review of the effect with default settings 3 Because you only want the car to fade and you do not want a wipe transition deselect Wipe 4 For the Direction select Out for the car to fade out 5 Click Up...

Страница 59: ...ublish command with the default settings Flash prepares your file for the web Flash publishes the SWF file and creates an HTML file with the tags necessary to display the SWF file After you define the...

Страница 60: ...sing the same settings you can select File Publish Note You can also create publish profiles See Creating a publish profile in Using Flash View your published application in a browser In your browser...

Страница 61: ...hands on tasks and real world scenarios allowing you to roll up your sleeves and get right to work Choose between instructor led and online training or combine them to create a learning path that is m...

Страница 62: ...he Samples folder which is in your Flash application directory The Samples page Help Samples also includes a link the Macromedia website where you ll find additional samples Books and Training section...

Страница 63: ...28 copying layer folder contents 31 layers 31 Customize Shortcuts dialog box 42 Customize Toolbar command 34 D Default Layout command for panels 39 deleting frames or keyframes 28 layers and layer fo...

Страница 64: ...d 27 Insert Layer command 29 installing Flash 15 16 instructional media 9 interactivity adding basic 58 K keyboard shortcuts adding and removing 42 customizing 42 deleting 43 for dialog box controls 4...

Страница 65: ...keyboard shortcuts for tree controls 47 Library 37 opening 37 resetting layout of 39 resizing 38 saving custom set 39 selecting layout 39 sets 38 ungrouping 38 using 37 using options menu 38 viewing l...

Страница 66: ...tering the playhead in 25 converting keyframes into frames 28 copying and pasting frames 28 deleting frames or keyframes 28 docking to the application window 24 dragging 24 dragging frames 28 editing...

Страница 67: ...67 U Undo Levels preference 39 upgrading from Macromedia Flash MX 2004 17 V vector art adding 53 viewing the application 59 W warning preferences 41 work area showing and hiding 23 Z Zoom tool 22 zoom...

Страница 68: ...68 Index...

Отзывы: