background image

154

Drawing

Specifying drawing settings

You can set drawing settings to specify snapping, smoothing, and straightening behaviors 
when you use Flash drawing tools. You can change the tolerance setting for each option, and 
turn each option off or on. Tolerance settings are relative, depending on the resolution of your 
computer screen and the current magnification of the scene. By default, each option is turned 
on and set to Normal tolerance.

To set drawing settings:

1.

Select Edit > Preferences (Windows) or Flash > Preferences (Macintosh) and select the 
Editing category.

2.

Under Drawing Settings, select from the following options:

Connect Lines

 determines how close the end of a line being drawn must be to an existing 

line segment before the end point snaps to the nearest point on the other line. The 
available options are Must Be Close, Normal, and Can Be Distant. This setting also 
controls horizontal and vertical line recognition—that is, how nearly horizontal or vertical 
a line must be drawn before Flash makes it exactly horizontal or vertical. When Snap to 
Objects is turned on, this setting controls how close objects must be to snap to one 
another.

Smooth Curves

 specifies the amount of smoothing applied to curved lines drawn with 

the Pencil tool when the drawing mode is set to Straighten or Smooth. (Smoother curves 
are easier to reshape, whereas rougher curves match the original line strokes more closely.) 
The selections are Off, Rough, Normal, and Smooth.

Recognize Lines

 defines how nearly straight a line segment drawn with the Pencil tool 

must be before Flash recognizes it as a straight line and makes it perfectly straight. The 
selections are Off, Strict, Normal, and Tolerant. If Recognize Lines is off while you draw, 
you can straighten lines later by selecting one or more line segments and selecting 
Modify > Shape > Straighten.

Recognize Shapes

 controls how precisely you must draw circles, ovals, squares, 

rectangles, and 90° and 180° arcs for them to be recognized as geometric shapes and 
redrawn accurately. The options are Off, Strict, Normal, and Tolerant. If Recognize 
Shapes is off while you draw, you can straighten lines later by selecting one or more shapes 
(for example, connected line segments) and selecting Modify > Shape > Straighten.

Click Accuracy

 specifies how close to an item the pointer must be before Flash recognizes 

the item. The options are Strict, Normal, and Tolerant.

NO

TE

You can further smooth existing curved segments using Modify > Shape > Smooth 
and Modify > Shape > Optimize.

Summary of Contents for FLASH 8-FLASH

Page 1: ...Using Flash ...

Page 2: ...SA and its suppliers All rights reserved Macromedia Flash 8 video is powered by On2 TrueMotion video technology 1992 2005 On2 Technologies Inc All Rights Reserved http www on2 com Visual SourceSafe is a registered trademark or trademark of Microsoft Corporation in the United States and or other countries Copyright 2005 Macromedia Inc All rights reserved This manual may not be copied photocopied re...

Page 3: ...ple Timelines and levels 37 About nested movie clips 37 Using absolute and relative target paths 39 About scenes 44 Working with scenes 45 Using the Movie Explorer 46 Using Find and Replace 48 Using the Undo Redo and Repeat menu commands 53 Using the History panel 55 Saving documents when you undo steps 58 Automating tasks with the Commands menu 58 Creating custom keyboard shortcuts 60 About custo...

Page 4: ...tances with behaviors 94 Creating custom behaviors 96 Best practices for using behaviors 98 Breaking apart instances 101 Getting information about instances on the Stage 102 Copying library assets between documents 103 Using shared library assets 104 Resolving conflicts between library assets 108 Chapter 4 Working with Color Strokes and Fills 111 About the Color Mixer 112 About creating gradients ...

Page 5: ...154 Chapter 6 Working with Text 157 About FlashType 159 About Unicode text encoding in Flash applications 160 About font outlines and device fonts 160 Creating text 162 Creating scrolling text 166 Setting text attributes 166 Creating font symbols 173 Editing text 174 Checking spelling 174 About transforming text 177 Using Timeline effects with text 177 Breaking text apart 177 Linking text to a URL...

Page 6: ... Flash Professional only 228 Applying filters Flash Professional only 229 About blend modes Flash Professional only 239 Applying a blend mode Flash Professional only 241 Chapter 10 Creating Motion 243 Using Timeline effects 244 About tweened animation 248 About frame by frame animation 249 About layers in animation 249 About creating keyframes 250 About representations of animation in the Timeline...

Page 7: ...ounds to buttons 315 Using sounds with Sound objects 316 About accessing ID3 properties in MP3 files with Flash Player 316 Using the sound editing controls 317 Controlling sound playback using behaviors 318 Starting and stopping sounds at keyframes 320 About the onSoundComplete event 320 Compressing sounds for export 321 About using sounds in Flash Lite 326 Chapter 13 Writing ActionScript with Scr...

Page 8: ...ns Flash Professional only 357 About using components with screens Flash Professional only 360 Accessibility in the Flash screens authoring environment Flash Professional only 361 Chapter 15 Creating Multilanguage Text 363 Selecting an encoding language 364 About fonts for Unicode encoded text 366 Using embedded fonts 366 Authoring multilanguage text with the Strings panel 370 Creating documents w...

Page 9: ...ntent 511 Worldwide accessibility standards 512 Macromedia Flash Accessibility web page 513 Understanding screen reader technology 513 Using Flash to enter accessibility information for screen readers 516 Viewing and creating tab order and reading order 525 Creating a tab order index for keyboard navigation in the Accessibility panel Flash Professional only 526 About animation and accessibility fo...

Page 10: ...6 Setting feedback options for a learning interaction 582 Setting Knowledge Track options for a learning interaction 583 Setting navigation options for a learning interaction 584 Setting control button labels for a learning interaction 585 Tracking to AICC or SCORM compliant learning management systems 586 Extending learning interaction scripts 590 Appendix A Using Templates 593 Using templates 59...

Page 11: ...nts 11 label 630 listbox 631 listitem 635 menulist 636 menupop 639 menuitem 640 popupslider 642 property 645 radiogroup 645 radio 646 targetlist 647 textbox 649 About the Configuration Folders 651 Index 655 ...

Page 12: ...12 Contents ...

Page 13: ...tion to a complex interactive web application such as an online store You can make your Flash applications media rich by adding pictures sound and video Flash includes many features that make it powerful but easy to use such as drag and drop user interface components built in behaviors that add ActionScript to your document and special effects that you can add to objects When you author in Flash y...

Page 14: ...sh Professional 8 includes all the features of Flash Basic 8 along with several powerful new tools It provides new expressiveness tools for optimizing the look and feel of the Flash files you design External scripting and capabilities for handling dynamic data from databases are some of the features that make Flash Professional 8 particularly suitable for large scale complex projects deployed usin...

Page 15: ...rectangles on page 137 Enhanced strokes Joins and caps on strokes are now drawn more cleanly and precisely A join is the place where two strokes come together A cap is the end point of a stroke that does not join with another stroke In addition the maximum size of a stroke has been increased from 10 to 200 pixels and you can now color strokes using a gradient fill For more information see Using th...

Page 16: ...xibility and ease of use Script Assist A new assisted mode in the Actions panel Script Assist lets you more easily create scripts without having detailed knowledge of ActionScript Script Assist helps you build scripts by selecting items from the Actions toolbox in the Actions panel and provides an interface of text fields radio buttons and check boxes that prompt you for the correct variables and ...

Page 17: ...rmation see Using Components Macintosh document tabs You can now open multiple Flash files in the same window and select among them using document tabs at the top of the window For more information see Using document tabs for multiple documents on page 25 Improved Preferences dialog box The Preferences dialog box has been streamlined and reorganized for improved clarity and ease of use For more in...

Page 18: ...tection resulted in the creation of three separate HTML pages The Flash Player detection feature has been improved so that it now publishes only a single HTML page simplifying the publishing of your Flash content For more information see Configuring publish settings for Flash Player detection on page 468 New features available in Flash Professional 8 Flash Professional 8 offers all the features av...

Page 19: ... Flash Player from having to continually redraw the image providing a significant improvement in playback performance For more information see Runtime bitmap caching movie clip and button symbols on page 81 Video improvements Flash Professional 8 provides several new video features to help you more easily create high quality video presentations using Flash On2 VP6 video codec Flash encodes video f...

Page 20: ...the playback of a video clip with accompanying interactive content when individual cue points are reached For example you can create a Flash presentation that has video playing in one area of the screen while descriptive text and graphics appear in another area Cue points cause the video playback to trigger these other actions in the presentation letting you create richer interactive content Using...

Page 21: ... menu let you automate tasks in a document This chapter contains the following sections Creating or opening a document and setting properties 22 Using document tabs for multiple documents 25 Saving Flash documents 25 About adding media content 29 About creating motion and interactivity 29 About components 30 Managing media assets with the library 31 About ActionScript 36 About Multiple Timelines a...

Page 22: ...can also use the Property inspector to set properties for an existing document The Property inspector makes it easy to access and change the most commonly used attributes of a document For more information on the Property inspector see Using panels and the Property inspector in Getting Started with Flash You can open a Flash template as a new document You can select from standard templates that co...

Page 23: ...aningful search results for Flash content do the following Enter a descriptive title in the Title text box Enter a description in the Description text box Descriptions can contain searchable keywords author and copyright information and short descriptions about the content and its purpose The search metadata is based on the RDF Resource Description Framework and XMP Extensible Metadata Platform sp...

Page 24: ...ument click the triangle in the Background Color box and select a color from the palette 6 To specify the unit of measure for rulers that you can display along the top and side of the application window select an option from the pop up menu in the upper right For more information see Using the grid guides and rulers in Getting Started with Flash This setting also determines the units used in the I...

Page 25: ... document tabs for multiple documents When you open multiple documents tabs at the top of the Document window identify the open documents and let you easily navigate among them Tabs appear only when documents are maximized in the Document window To make a document active you click its tab By default tabs appear in the order in which the documents were created You cannot drag tabs to change their o...

Page 26: ...educe the document file size using the File Save and Compact command See Saving documents when you undo steps on page 58 To save a Flash document 1 Do one of the following To overwrite the current version on the disk select File Save To save the document in a different location and or with a different name or to compress the document select File Save As 2 If you selected the Save As command or if ...

Page 27: ... characters in their naming schemes Many Flash designers and developers adopt a naming system that uses a noun verb or adjective noun combination for naming files Two examples of naming schemes are as follows class_planning swf and my_project swf Avoid cryptic file names It is good practice to save new versions of a FLA file when you build an extensive project The following are different ways that...

Page 28: ...ns the time it takes to save the document When you select Save As and type a new name for the file Flash writes a new and optimized version of the file which results in a smaller file size When you select Save and Compact Flash creates a new optimized file and deletes the original file Remember to use Save As frequently and to type a new file name for your document after every milestone in your pr...

Page 29: ...ns use a bitmap as a file convert the bitmap to vector artwork and modify it in other ways See Chapter 7 Using Imported Artwork on page 191 Video You can import video clips from other applications as embedded or linked files and select compression and editing options See Chapter 11 Working with Video on page 271 Sound You can import sound files from other applications and use them as event sounds ...

Page 30: ...rs on page 302 Controlling sound playback using behaviors on page 318 In screen based documents you can use behaviors to control screens See Creating controls and transitions for screens with behaviors Flash Professional only on page 353 About components Components are movie clips with parameters that let you modify their appearance and behavior A component can provide a wide range of functionalit...

Page 31: ...pen the library of any Flash document while you are working in Flash to make the library items from that file available for the current document You can create permanent libraries in your Flash application that is available whenever you start Flash Flash also includes several sample libraries containing buttons graphics movie clips and sounds that you can add to your Flash documents The sample Fla...

Page 32: ...n use the Play button in the library preview window or the Controller to preview the item You can use folders in the library to organize library items See Working with folders in the Library panel on page 33 To use a library item in the current document Drag the item from the Library panel onto the Stage The item is added to the current layer To convert an object to a symbol in the library Drag th...

Page 33: ...se All Folders from the Library options menu To move an item between folders Drag the item from one folder to another If an item with the same name exists in the new location Flash prompts you to replace it with the item you are moving Sorting items in the Library panel Columns in the Library panel list the name of an item its type the number of times it s used in the file its linkage status and i...

Page 34: ...ng library items You can rename items in the library Changing the library item name of an imported file does not change the filename To rename a library item do one of the following Double click the item s name and enter the new name in the text box Select the item and select Rename from the Library options menu and then enter the new name in the text box Right click Windows or Control click Macin...

Page 35: ...n See Sorting items in the Library panel on page 33 Updating imported files in the Library panel If you use an external editor to modify files that you have imported into Flash such as bitmaps or sound files you can update the files in Flash without reimporting them You can also update symbols that you have imported from external Flash documents Updating an imported file replaces its contents with...

Page 36: ...sing an external editor You don t need to understand every ActionScript element to begin scripting if you have a clear goal you can start building scripts with simple actions You can incorporate new elements of the language as you learn them to accomplish more complicated tasks As with other scripting languages ActionScript follows its own rules of syntax reserves keywords provides operators and l...

Page 37: ... more information see About nested movie clips on page 37 You can use ActionScript to send a message from one Timeline to another You must use a target path to specify the location of the Timeline to which you are sending the message For more information see Using absolute and relative target paths on page 39 About nested movie clips Flash documents can have movie clip instances in their Timelines...

Page 38: ...y consider the hierarchy on a computer the hard disk has a root directory or folder and subdirectories The root directory is analogous to the main Timeline of a Flash document it is the parent of everything else The subdirectories are analogous to movie clips You can use the movie clip hierarchy in Flash to organize related objects Any change you make to a parent movie clip also affects its childr...

Page 39: ...ance is always a full path from a level name regardless of which Timeline calls the action for example the absolute path to the instance california is _level0 westCoast california A relative path is different when called from different locations for example the relative path to california from sanfrancisco is _parent but from portland it s _parent _parent california About absolute paths An absolut...

Page 40: ...and the target Timeline Relative paths can address targets only within their own level of Flash Player For example you can t use a relative path in an action on _level0 that targets a Timeline on _level5 In a relative path use the keyword this to refer to the current Timeline in the current level use the alias _parent to indicate the parent Timeline of the current Timeline You can use the _parent ...

Page 41: ...or button you must assign an instance name to the movie clip or button A loaded document doesn t require an instance name because you use its level number as an instance name for example _level5 To specify a target path do one of the following Use the Insert Target Path button and dialog box in the Actions panel Enter the target path manually Create an expression that evaluates to a target path Yo...

Page 42: ...e following Enter an expression that evaluates to a target path in a parameter box Click to place the insertion point in the script Then in the Functions category of the Actions toolbox double click the targetPath function The targetPath function converts a reference to a movie clip into a string Click to place the insertion point in the script Then in the Functions category of the Actions toolbox...

Page 43: ...se layer folders to organize similar layers If applicable place your layers that include ActionScript and a layer for frame labels at the top of the layer stack in the Timeline This makes it easy to locate the layers that include code and labels Add frame labels in a FLA file instead of using frame numbers in your ActionScript to reference points on the Timeline This is important and useful if you...

Page 44: ...Scenes force users to progressively download the entire SWF file even if they do not plan or want to watch all of it Your users progressively download the entire file instead of loading the assets they actually want to see or use If you avoid scenes users can control what content they download as they progress through your SWF file This means that users have more control over how much content they...

Page 45: ...ar fashion you use actions For more information see Chapter 5 Syntax and Language Fundamentals in Learning ActionScript 2 0 in Flash To display the Scene panel Select Window Other Panels Scene To view a particular scene Select View Go To and then select the name of the scene from the submenu To add a scene do one of the following Click the Add Scene button in the Scene panel Select Insert Scene To...

Page 46: ...nces of a particular symbol or action Print the navigable display list that appears in the Movie Explorer The Movie Explorer has an options menu as well as a context menu with options for performing operations on selected items or modifying the Movie Explorer display The options menu is indicated by a check mark with a triangle below it in the title bar of the Movie Explorer To view the Movie Expl...

Page 47: ...ck Windows or Control click Macintosh an item in the Movie Explorer navigation tree 2 Select an option from the menu Go to Location jumps to the selected layer scene or frame in the document Go to Symbol Definition jumps to the symbol definition for a symbol that is selected in the Movie Elements area of the Movie Explorer The symbol definition lists all the files associated with the symbol The Sh...

Page 48: ... replace the specified element with another element of the same type Depending on the type of specified element there are different options available in the Find and Replace dialog box You can find and replace elements in the current document or the current scene You can search for the next occurrence or all occurrences of an element and you can replace the current occurrence or all occurrences Th...

Page 49: ...Word is deselected the word place can be searched as part of the word replace Match Case searches for text that exactly matches the case uppercase and lowercase character formatting of the specified text when finding and replacing Regular Expressions searches for text in regular expressions in ActionScript An expression is any statement that Flash can evaluate that returns a value For more informa...

Page 50: ...er a value for minimum and maximum font size to specify the range of font sizes to be searched When Font Size is deselected all font sizes in the scene or document are searched To replace the specified font with a different font name select Font Name under Replace With and select a font name from the pop up menu or enter a name in the text box When Font Name is deselected under Replace with the cu...

Page 51: ...and replace a color 1 Select Edit Find and Replace 2 Select Color from the For pop up menu 3 To search for a color click the Color control and do one of the following Select a color swatch from the color pop up window Enter a hexadecimal color value in the Hex Edit text box in the color pop up window Click the Color Picker button and select a color from the system color picker Drag from the Color ...

Page 52: ...ace a symbol with another symbol of any type movie clip button or graphic To find and replace a symbol 1 Select Edit Find and Replace 2 Select Symbol from the For pop up menu 3 For Name select a name from the pop up menu 4 Under Replace With for Name select a name from the pop up menu 5 Select Live Edit to select the next occurrence of the specified symbol on the Stage and edit it in place 6 To fi...

Page 53: ...Find Next to find the next occurrence of the specified sound video or bitmap Click Find All to find all occurrences of the specified sound video or bitmap 7 To replace a sound video or bitmap do one of the following Click Replace to replace the currently selected occurrence of the specified sound video or bitmap Click Replace All to replace all occurrences of the specified sound video or bitmap Us...

Page 54: ... behavior Rename library items Move library items Edit library items Import to library Create font symbols Create library folders Expand all library folders Create video stream symbols Convert to compiled clip JSFL library edits Modify bitmap symbol properties Modify sound symbol properties Modify library item linkage Convert to symbol Create new symbol Run JSFL command Run JSFL file Modify movie ...

Page 55: ...u created or opened that document up to a specified maximum number of steps The History panel doesn t show steps you ve performed in other documents The slider in the History panel initially points to the last step that you performed You can use the History panel to undo or redo individual steps or multiple steps at once You can apply steps from the History panel to the same object or to a differe...

Page 56: ...ommand Undoing steps with the History panel You can undo the last step or multiple steps with the History panel When you undo a step the step is dimmed in the History panel To undo the last step performed Drag the History panel slider up one step in the list To undo multiple steps at once do one of the following Drag the slider to point to any step Click to the left of a step along the path of the...

Page 57: ...o Control click or Command click to deselect a selected step 2 Click Replay The selected steps replay in order and a new step labeled Replay Steps appears in the History panel Copying and pasting steps between documents Each open document has its own history of steps You can copy steps from one document and paste them into another using the Copy Steps command in the History panel options menu If y...

Page 58: ...task numerous times You can create a new command in the Commands menu from steps in the History panel and reuse the command multiple times Steps replay exactly as they were originally performed You can t modify the steps as you replay them You should create and save a new command if there s a chance you might want to use a set of steps again especially if you want to use those steps the next time ...

Page 59: ...ct a command to rename and enter a new name for it 3 Click Close To delete a name from the Commands menu 1 Select Commands Edit Command List 2 Select a command 3 Click Delete and click Close Running commands You can use the commands that you create by selecting the command name from the Commands menu You can also run commands that are available on your system as JavaScript or Flash JavaScript file...

Page 60: ... set you ve defined The predetermined sets are listed at the top of the menu For example if you are familiar with the shortcuts found in Adobe Illustrator or Macromedia Freehand you can use those shortcuts by choosing the corresponding predetermined set Commands lets you select a category of commands to edit For example you can edit menu commands such as the Open command The command list displays ...

Page 61: ...s to the keyboard shortcuts To remove a shortcut from a command 1 From the Commands pop up menu select a command category The Commands list displays the commands in that category 2 Select a command from the Commands list The shortcuts assigned to the command appear in the Shortcuts list 3 Select a shortcut 4 Click Remove Item To add a shortcut to a command 1 From the Commands pop up menu select a ...

Page 62: ...e text editing context menu that appears with Flash documents in Flash Player 7 and later The standard context menu appears when a user right clicks Windows or Control clicks Macintosh on a document in Flash Player in any area except an editable text field You can add custom items to the menu and hide any built in items in the menu except Settings and Debugger N OT E If there is a problem with the...

Page 63: ...items Custom context menu items are automatically encoded using Unicode UTF 8 text encoding About the links menu in Flash Player If a user is using a Netscape browser or an Active X application to display Flash Player the player displays a links menu for all Flash documents If the user right clicks Windows or Control clicks Macintosh on a text link in the Flash document the links menu appears with...

Page 64: ...een This option draws more slowly than the Fast option Anti aliasing works best on video cards that provide thousands 16 bit or millions 24 bit of colors In 16 or 256 color mode black lines are smoothed but colors might look better in Fast mode Antialias Text smooths the edges of any text This command works best with large font sizes and can be slow with large amounts of text This is the most comm...

Page 65: ...Use Modify Curves Optimize to minimize the number of separate lines that are used to describe shapes Limit the number of special line types such as dashed dotted ragged and so on Solid lines require less memory Lines created with the Pencil tool require less memory than brush strokes To optimize text and fonts Limit the number of fonts and font styles Use embedded fonts sparingly because they incr...

Page 66: ...mproves streaming performance When external SWF files GIF and XML files and variables are streamed into a player by using ActionScript calls such as loadMovie and getUrl the data flows at the rate set for streaming The stream rate for the main SWF file is reduced based on the reduction of bandwidth caused by the additional data requests It s helpful to test your document at each speed and on each ...

Page 67: ...raph to show settings for the corresponding frame in the left window and stop the document 6 If necessary adjust the view of the graph by taking one of the following actions Select View Streaming Graph to show which frames cause pauses This default view displays alternating light and dark gray blocks that represent each frame The side of each block indicates its relative byte size The first frame ...

Page 68: ... Macintosh these options are divided between the Page Setup and the Print Margins dialog boxes The Print and Page Setup dialog boxes are standard within either operating system and their appearance depends on the selected printer driver To set printing options 1 Select File Page Setup Windows or File Print Margins Macintosh 2 Set page margins Select both Center options to print the frame in the ce...

Page 69: ...ash Project Each file can be added to a particular Flash Project only once Files can be organized in nested folders A Flash Project is an XML file with the file extension flp for example myProject flp The XML file references all the document files contained in the Flash Project A Flash Project can contain another Flash Project FLP file Changes that you make to a project are updated to the FLP file...

Page 70: ...e another project Flash automatically saves and closes the first file To view the Flash Project panel Select Window Project To view the Project pop up menu When a project is open click the Project button at the upper left corner of the Flash Project panel To create a new project 1 Do one of the following to open a new project Select New Project from the Project pop up menu If no other project is o...

Page 71: ...lect the item in the Flash Project panel and do one of the following Click the Remove button at the lower right corner of the Flash Project panel Press the Delete key Right click Windows or Control click Macintosh the file or folder and select Remove from the context menu To open a file from the Flash Project panel in Flash Double click the filename in the Flash Project panel If the file is of a n...

Page 72: ...rom the context menu 2 In the Project Settings dialog box select the FLA file in the tree structure 3 Select a publish profile from the Profile menu For information on publish profiles see Using publish profiles on page 478 To publish a project Select Publish Project from the Project pop up menu To save files in a project when testing or publishing 1 Select Edit Preferences Windows or Flash Prefer...

Page 73: ...llowing Select Find Missing File from the Project pop up menu Right click Windows or Control click Macintosh and select Find Missing File from the context menu 3 Navigate to the file and click OK Using version control with projects Flash Professional only Version control in Flash Professional 8 lets you ensure that each author working in a project file is always using the latest version of a file ...

Page 74: ...Database Path text box click Browse to browse for the VSS database you want or enter the full file path The file you select becomes the srcsafe ini file used to initialize SourceSafe b In the Project text box enter the project within the VSS database you want to use as the remote site s root directory c In the Username and Password text boxes enter your login user name and password for the selecte...

Page 75: ...ite the local version with the version from the remote site Troubleshooting remote folder setup Flash Professional only A web server can be configured in a wide variety of ways The following list provides information on some common issues you may encounter in setting up a remote folder for use with version control and how to resolve them The Flash FTP implementation may not work properly with cert...

Page 76: ...ed to a remote site Use underscores in place of spaces and avoid special characters in filenames and folder names wherever possible In particular colons slashes periods and apostrophes in filenames or folder names can cause problems If problems persist try uploading with an external FTP program to find out if the problem is specific to using FTP in Flash ...

Page 77: ...ach symbol has its own Timeline You can add frames keyframes and layers to a symbol Timeline just as you can to the main Timeline For more information see Using the Timeline in Getting Started with Flash If the symbol is a movie clip or a button you can control the symbol with ActionScript For more information see Chapter 10 Handling Events in Learning ActionScript 2 0 in Flash An instance is a co...

Page 78: ... assets on page 108 For an introduction to using symbols and instances see Basic Tasks Create Symbols and Instances in Flash Tutorials This chapter contains the following sections Types of symbols 79 About 9 slice scaling and movie clip symbols 79 Editing movie clip symbols with 9 slice scaling 80 Runtime bitmap caching movie clip and button symbols 81 About controlling instances and symbols with ...

Page 79: ...her movie clip instances You can also place movie clip instances inside the Timeline of a button symbol to create animated buttons Use font symbols to export a font and use it in other Flash documents See Creating font symbols on page 173 Flash provides built in components movie clips with defined parameters that you can use to add user interface elements such as buttons check boxes or scroll bars...

Page 80: ...hen you are in symbol editing mode the slice guides appear with dotted lines superimposed on the symbol on the main Stage The guides do not appear when the symbol is in edit in place mode Slice guides don t snap when you drag them in the workspace To enable 9 slice scaling for an existing movie clip symbol 1 With the source document open select Window Library to display the Library panel 2 Select ...

Page 81: ... prevents Flash Player from having to continually redraw the image which provides a significant improvement in playback performance For example when creating animations with a complex background you can create a movie clip for the background The background is rendered as a bitmap stored at the current screen depth It can be drawn very quickly letting the animation play both faster and more smoothl...

Page 82: ...e a unique instance name to be used with ActionScript For information on assigning a name to an instance see Creating instances on page 85 You can also use ActionScript to control movie clip or button symbols For more information see Chapter 10 Handling Events in Learning ActionScript 2 0 in Flash Creating symbols You can create a symbol from selected objects on the Stage or you can create an empt...

Page 83: ...ling and movie clip symbols on page 79 5 Click OK Flash adds the symbol to the library The selection on the Stage becomes an instance of the symbol You cannot edit an instance directly on the Stage you must open it in symbol editing mode You can also change the registration point for a symbol See Editing symbols on page 89 To create a new empty symbol 1 Make sure that nothing is selected on the St...

Page 84: ...he main Timeline select every frame in every layer of the animation on the Stage that you want to use For information on selecting frames see Using the Timeline in Getting Started with Flash 2 Do one of the following to copy the frames Right click Windows or Control click Macintosh any selected frame and select Copy Frames from the context menu Select Cut if you want to delete the sequence after c...

Page 85: ... from the context menu Select Duplicate from the Library options menu To duplicate a symbol by selecting an instance 1 Select an instance of the symbol on the Stage 2 Select Modify Symbol Duplicate Symbol The symbol is duplicated and the instance is replaced with an instance of the duplicate symbol Creating instances After you create a symbol you can create instances of that symbol wherever you li...

Page 86: ...ffects assign actions set the graphic display mode or change the behavior of the instance The behavior of the instance is the same as the symbol behavior unless you specify otherwise Any changes you make affect only the instance and not the symbol See Changing instance properties on page 91 Creating buttons Buttons are actually four frame interactive movie clips When you select the button behavior...

Page 87: ...lude prebuilt features such as accessibility support and can be customized Button components include the PushButton and RadioButton For more information see Chapter 4 Button component in Using Components To create a button 1 Select Edit Deselect All to ensure that nothing is selected on the Stage 2 Select Insert New Symbol or press Control F8 Windows or Command F8 Macintosh To create the button yo...

Page 88: ...on see Adding sounds to buttons on page 315 9 When you finish select Edit Edit Document Drag the button symbol from the Library panel to create an instance of it in the document Enabling editing and testing buttons By default Flash keeps buttons disabled as you create them to make it easier to select and work with them When a button is disabled clicking the button selects it When a button is enabl...

Page 89: ...ther objects on the Stage using the Edit in Place command Other objects are dimmed to distinguish them from the symbol you are editing The name of the symbol you are editing is displayed in an Edit bar at the top of the Stage to the right of the current scene name You can also edit a symbol in a separate window using the Edit in New Window command Editing a symbol in a separate window lets you see...

Page 90: ...of the symbol on the Stage and right click Windows or Control click Macintosh and select Edit in New Window from the context menu 2 Edit the symbol as needed 3 To change the registration point drag the symbol on the Stage A cross hair indicates the location of the registration point 4 Click the Close box in the upper right corner Windows or upper left corner Macintosh to close the new window and c...

Page 91: ... Classes in Learning ActionScript 2 0 in Flash To edit instance properties you use the Property inspector Windows Properties The properties of an instance are saved with it If you edit a symbol or relink an instance to a different symbol any instance properties you ve changed still apply to the instance Changing the color and transparency of an instance Each instance of a symbol can have its own c...

Page 92: ... let you reduce the color or transparency values by a specified percentage The controls on the right let you reduce or increase the color or transparency values by a constant value The current red green blue and alpha values are multiplied by the percentage values and then added to the constant values in the right column producing the new color values For example if the current red value is 100 se...

Page 93: ...u can change an instance s type to redefine its behavior in a Flash application For example if a graphic instance contains animation that you want to play independently of the main Timeline you could redefine the graphic instance as a movie clip instance To change an instance s type 1 Select the instance on the Stage and select Window Properties 2 Select Graphic Button or Movie Clip from the pop u...

Page 94: ... document without writing ActionScript Behaviors are prewritten ActionScript scripts that let you add the power control and flexibility of ActionScript coding to your document without having to create the ActionScript code yourself You can use behaviors with an instance to arrange it in the stacking order on a frame as well as to load or unload play stop duplicate or drag a movie clip or to link t...

Page 95: ... duplicate X offset and Y offset of pixels from original to copy GotoAndPlay at frame or label Plays a movie clip from a particular frame Instance name of target clip to play Frame number or label to play GotoAndStop at frame or label Stops a movie clip optionally moving the playhead to a particular frame Instance name of target clip to stop Frame number or label to stop Bring to Front Brings targ...

Page 96: ...ctionScript code needed to perform the desired behavior and save the file in the Behaviors folder of your local computer Behaviors are stored in the following location Windows C Documents and Settings user name Local Settings Application Data Macromedia Flash 8 language Configuration Behaviors Macintosh Macintosh HD Users user name Library Application Support Macromedia Flash 8 language Configurat...

Page 97: ...nal edition of Flash 8 specify pro for the authoringEdition parameter 5 Optional If your custom behavior require a dialog box enter parameters using the properties and dialog tags To learn about the tags and parameters used to create your own custom dialog boxes see Appendix B XML to UI 6 In the actionscript tag insert the ActionScript code to create the behavior you want to create If you are new ...

Page 98: ...and can be useful for novice Flash and ActionScript users Before you start using behaviors take a close look at how you want to structure your FLA file What behaviors do you need for your project What code do the behaviors contain How are you are going to use and implement behaviors What other ActionScript do you need to add If you carefully plan a document that uses behaviors you can avoid proble...

Page 99: ...e code or code on individual objects easy to find and edit in the Actions panel Find and replace Lets you search for strings and replace them in a FLA document Script pinning Lets you pin multiple scripts from various objects and work with them simultaneously in the Actions panel This works best with the Script navigator Movie Explorer Lets you view and organize the contents of a FLA file and sele...

Page 100: ...mes it is easier to write the ActionScript yourself The main difference between a FLA file with behaviors and a FLA file without behaviors is the workflow you must use for editing the project If you use behaviors you must select each instance on the Stage or select the Stage and open the Actions or Behaviors panel to make modifications If you write your own ActionScript and put all your code on th...

Page 101: ...aviors Use Movie Explorer to locate ActionScript Clearly document the use of behaviors if you are working with a complex document If you keep track of where you use behaviors you might have fewer headaches in the long run Perhaps you can create a flow chart or list or use good documentation comments in a central location on the main Timeline Breaking apart instances To break the link between an in...

Page 102: ...Info panel In the Info panel you can view the instance s size and location the location of its registration point its red R green G blue B and alpha A values if the instance has a solid fill and the location of the pointer The Info panel also displays the x and y coordinates of either the symbol s registration point or the symbol s upper left corner depending on which option is selected To display...

Page 103: ...g the asset or by opening the library of the source document in the destination document and dragging the source document assets into the destination document You can also share symbols between documents as shared library assets during authoring or at runtime See Using shared library assets on page 104 If you attempt to copy assets that have the same name as existing assets in the destination docu...

Page 104: ...ets are loaded into the destination document during document playback that is at runtime The source document containing the shared asset does not need to be available on your local network when you author the destination document However the source document must be posted to a URL in order for the shared asset to be available to the destination document at runtime For shared assets during authorin...

Page 105: ...t accessible for linking to destination documents To define a runtime shared asset in a source document 1 With the source document open select Window Library to display the Library panel 2 Do one of the following Select a movie clip button or graphic symbol in the Library panel and select Properties from the Library options menu Click the Advanced button to expand the Properties dialog box Select ...

Page 106: ...ing Select a movie clip button graphic symbol bitmap or sound in the Library panel and select Properties from the Library options menu Click the Advanced button to expand the Properties dialog box Select a font symbol and select Linkage from the Library options menu 3 For Linkage select Import for Runtime Sharing to link to the asset in the source document 4 Enter an identifier for the symbol bitm...

Page 107: ...ol you select Any assets that the selected symbol uses are also copied into the destination document To update or replace a symbol 1 With the document open select a movie clip button or graphic symbol and select Properties from the Library options menu 2 If the Symbol Properties dialog box is in basic mode click Advanced to display the Linkage and Source panels If the Linkage and Source panel are ...

Page 108: ...have a copy of the symbol or component that has a different modification date from the one you re pasting If you choose not to replace the existing items Flash attempts to use the existing item instead of the conflicting item that you are pasting For example if you copy a symbol named Symbol 1 and paste the copy into the Stage of a document that already contains a symbol named Symbol 1 Flash creat...

Page 109: ...conflicts between library assets do one of the following Click Don t Replace Existing Items to preserve the existing assets in the destination document Click Replace Existing Items to replace the existing assets and their instances with the new items of the same name ...

Page 110: ...110 Using Symbols Instances and Library Assets ...

Page 111: ...eate a filled shape with no outline by using No Color as an outline And you can apply a solid color fill to text See Setting text attributes on page 166 You can modify stroke and fill attributes in a variety of ways using the Paint Bucket Ink Bottle Eyedropper and Fill Transform tools and the Lock Fill modifier for the Brush or Paint Bucket tools With the Color Mixer you can easily create and edit...

Page 112: ...adient and bitmap fills 121 Copying strokes and fills with the Eyedropper tool 124 Locking a gradient or bitmap to fill the Stage 124 Modifying color palettes 125 About the Color Mixer The Color Mixer provides options for changing the color of strokes and fills as well as creating multicolor gradients You can use gradients to produce a wide range of effects such as giving an illusion of depth to a...

Page 113: ...nt fill an alpha value of 100 creates an opaque fill Current Color Swatch displays the currently selected color If you select a gradient fill type Linear or Radial from the fill Type pop up menu the Current Color Swatch displays the color transitions within the gradient you create Color Picker lets you select a color visually Click the Color Picker and drag the cross hair pointer around until you ...

Page 114: ...use with Flash Player 8 These controls called overflow modes let you specify how colors are applied beyond the gradient For more information see Transforming gradient and bitmap fills on page 121 Using the Stroke Color and Fill Color controls in the Tools panel The Stroke Color and Fill Color controls in the Tools panel let you select a solid stroke color or a solid or gradient fill color switch t...

Page 115: ...e and weight for a selected object you can use the Stroke Color controls in the Property inspector For stroke style you can choose from styles that are preloaded with Flash or you can create a custom style To select a solid color fill you can use the Fill Color control in the Property inspector To select a stroke color style and weight using the Property inspector 1 Select an object or objects on ...

Page 116: ...option to set the style for a path end None is flush with the path s end Round Square extends beyond the path by half the stroke width 8 Optional If you are drawing lines using the Pencil or Brush tools with the drawing mode set to Smooth you can specify the degree to which Flash smooths the lines you draw using the Smoothing pop up slider By default the Smoothing value is set to 50 but you can sp...

Page 117: ...olor s hexadecimal value in the text box Working with solid colors and gradient fills in the Color Mixer To create and edit solid colors and gradient fills you can use the Color Mixer If an object is selected on the Stage the color modifications you make in the Color Mixer are applied to the selection You can create any color using the Color Mixer You can select colors in RGB or HSB or you can exp...

Page 118: ...d Brightness values for HSB display or hexadecimal values for hexadecimal display Enter an Alpha value to specify the degree of transparency from 0 for complete transparency to 100 for complete opacity Click the Default Stroke and Fill button to return to the default color settings black and white white fill and black stroke Click the Swap Stroke and Fill button to swap colors between the fill and...

Page 119: ...dicating the colors in the gradient 5 Optional Select an overflow mode to apply to the gradient extend the default mode reflect and repeat 6 Optional Select the linear RGB check box to create an SVG compliant Scalable Vector Graphics linear or radial gradient 7 To change a color in the gradient select one of the color pointers below the gradient definition bar and double click the color space that...

Page 120: ...tor as described in Using the Stroke Color and Fill Color controls in the Property inspector on page 115 4 Click an object on the Stage to apply the stroke modifications Applying solid gradient and bitmap fills with the Paint Bucket tool The Paint Bucket tool fills enclosed areas with color This tool lets you fill empty areas and change the color of already painted areas You can paint with solid c...

Page 121: ...handles is displayed When the pointer is over any one of these handles it changes to indicate the function of the handle Center point Select and move the center point handle to change the center point of the gradient The rollover icon for the center point handle is a four way arrow Focal point Select the focal point handle to change the focal point of a radial gradient The focal point handle is di...

Page 122: ...shape the gradient or fill in any of the following ways To reposition the center point of the gradient or bitmap fill drag the center point To change the width of the gradient or bitmap fill drag the square handle on the side of the bounding box This option resizes only the fill not the object containing the fill To change the height of the gradient or bitmap fill drag the square handle at the bot...

Page 123: ... fill drag the square handle at the center of the bounding box To change the focal point of a circular gradient drag the middle circular handle on the bounding circle To skew or slant a fill within a shape drag one of the circular handles on the top or right side of the bounding box To tile a bitmap inside a shape scale the fill NO TE To see all the handles when working with large fills or fills c...

Page 124: ... or filled area to apply the new attributes Locking a gradient or bitmap to fill the Stage You can lock a gradient or bitmap fill to make it appear that the fill extends over the entire Stage and that the objects painted with the fill are masks revealing the underlying gradient or bitmap For information on applying a bitmap fill see Applying a bitmap fill on page 203 When you select the Lock Fill ...

Page 125: ...export and modify a file s color palette you use the Color Swatches panel You can duplicate colors remove colors from the palette change the default palette reload the web safe palette if you have replaced it or sort the palette according to hue You can import and export both solid and gradient color palettes between Flash files as well as between Flash and other applications such as Macromedia Fi...

Page 126: ... is used when you create new files To load the web safe 216 color palette In the Color Swatches panel select Web 216 from the pop up menu in the upper right corner Sorting the palette To make it easier to locate a color you can sort colors in the palette by hue To sort colors in the palette In the Color Swatches panel select Sort by Color from the pop up menu in the upper right corner Importing an...

Page 127: ...Add Colors To replace the current palette with the imported colors select Replace Colors 2 Navigate to the desired file and select it 3 Click OK To export a color palette 1 In the Color Swatches panel select Save Colors from the pop up menu in the upper right corner 2 In the dialog box that appears enter a name for the color palette 3 For Save As Type Windows or Format Macintosh select Flash Color...

Page 128: ...128 Working with Color Strokes and Fills ...

Page 129: ...tools work and how drawing painting and modifying shapes can affect other shapes on the same layer This chapter contains the following sections About vector and bitmap graphics 130 About Flash drawing models 131 About Flash drawing and painting tools 133 Using the Object Drawing model 134 Drawing with the Pencil tool 136 Drawing straight lines ovals and rectangles 137 Drawing polygons and stars 13...

Page 130: ...alled vectors that also include color and position properties For example the image of a leaf is described by points through which lines pass creating the leaf s outline The color of the leaf is determined by the color of the outline and the color of the area enclosed by the outline When you edit a vector graphic you modify the properties of the lines and curves that describe its shape You can mov...

Page 131: ...its appearance In particular resizing a bitmap graphic can make the edges of the image ragged as pixels are redistributed within the grid Displaying a bitmap graphic on an output device that has a lower resolution than the image itself also degrades its quality About Flash drawing models Flash provides two drawing models that give you a great deal of flexibility when drawing shapes Merge Drawing m...

Page 132: ...x You can use the Pointer tool to move the object by clicking the bounding box and dragging the shape anywhere you d like to position it on the Stage Overlapping shapes using the Merge Drawing model When you use the Pencil Pen Line Oval Rectangle or Brush tool to draw a line across another line or painted shape the overlapping lines are divided into segments at the intersection points You can use ...

Page 133: ...se lines shapes and paths and for painting filled objects To draw freeform lines and shapes as if drawing with a real pencil you use the Pencil tool See Drawing with the Pencil tool on page 136 To draw precise paths as straight or curved lines you use the Pen tool See Using the Pen tool on page 138 To draw basic geometric shapes you use the Line Oval and Rectangle tools See Drawing straight lines ...

Page 134: ...ng the Object Drawing model By default Flash uses the Merge Drawing model To draw shapes using the Object Drawing model you must click the Object Drawing button in the Tools panel To enable the object drawing model 1 Select a drawing tool that supports the Object Drawing model The supported drawing tools are the Pencil Line Pen Brush Oval Rectangle and Polygon tools 2 Select the Object Drawing but...

Page 135: ... are completely enclosed by the selection marquee Points that lie within the selection area will still be selected Select Contact Sensitive Selection and Lasso tools if you want to select objects or groups that are only partially enclosed by the selection marquee Combining objects You can use the Combine Object commands in the Modify menu Modify Combine Object to create new shapes by combining or ...

Page 136: ...he Property inspector See Using the Stroke Color and Fill Color controls in the Property inspector on page 115 3 Select a drawing mode under Options in the Tools panel Select Straighten to draw straight lines and convert approximations of triangles ovals circles rectangles and squares into these common geometric shapes Select Smooth to draw smooth curved lines Select Ink to draw freehand lines wit...

Page 137: ...e A value of zero creates square corners 4 Drag on the Stage If you are using the Rectangle tool press the Up Arrow and Down Arrow keys while dragging to adjust the radius of rounded corners For the Oval and Rectangle tools Shift drag to constrain the shapes to circles and squares To specify a specific size of Oval or Rectangle in pixels press the Alt key Windows or Option key Macintosh with the O...

Page 138: ...r between 0 and 1 to specify the depth of the star points A number closer to 0 creates deeper points like needles If you are drawing a polygon leave this setting unchanged It does not affect the polygon shape 6 Click OK to close the Tool Settings dialog box 7 Drag on the Stage Using the Pen tool To draw precise paths as straight lines or smooth flowing curves you can use the Pen tool You can creat...

Page 139: ...chor points as hollow and deselected anchor points as solid If this option is not chosen selected anchor points are solid and deselected anchor points are hollow Show Precise Cursors specifies that the Pen tool pointer appear as a cross hair pointer rather than the default Pen tool icon for more precise placement of lines Deselect the option to display the default Pen tool icon with the Pen tool 3...

Page 140: ...indows or Command click Macintosh anywhere away from the path To close a path position the Pen tool over the first anchor point A small circle appears next to the pen tip when it is positioned correctly Click or drag to close the path To complete the shape as is select Edit Deselect All or select a different tool in the Tools panel Drawing curved paths with the Pen tool You create curves by draggi...

Page 141: ... the tangent handles of the curve appear 4 Release the mouse button The length and slope of the tangent handles determine the shape of the curve segment You can move the tangent handles later to adjust the curve 5 Position the pointer where you want the curve segment to end hold down the mouse button and drag in the opposite direction to complete the segment Shift drag to constrain the segment to ...

Page 142: ...an nudge selected anchor points to make small adjustments Deleting unneeded anchor points on a curved path optimizes the curve and reduces the file size To move an anchor point Drag the point with the Subselection tool To nudge an anchor point or points Select the point or points with the Subselection tool and use the arrow keys to move the point or points To convert an anchor point do one of the ...

Page 143: ... of the segment or adjust curved segments to change the slope or direction of the curve When you move a tangent handle on a curve point the curves on both sides of the point adjust When you move a tangent handle on a corner point only the curve on the same side of the point as the tangent handle adjusts To adjust a straight segment 1 Select the Subselection tool and select a straight segment 2 Use...

Page 144: ...ze for new strokes remains constant even when you change the magnification level for the Stage so the same brush size appears larger when the Stage magnification is lower For example suppose you set the Stage magnification to 100 and paint with the Brush tool using the smallest brush size Then you change the magnification to 50 and paint again using the smallest brush size The new stroke that you ...

Page 145: ... Stroke Color and Fill Color controls in the Property inspector on page 115 3 Click the Brush Mode modifier and select a painting mode Paint Normal paints over lines and fills on the same layer Paint Fills paints fills and empty areas leaving lines unaffected Paint Behind paints in blank areas of the Stage on the same layer leaving lines and fills unaffected Paint Selection applies a new fill to t...

Page 146: ...lines and shape outlines created with the Pencil Brush Line Oval or Rectangle tool by dragging with the Selection tool or by optimizing their curves You can also use the Subselection tool to display points on lines and shape outlines and modify the lines and outlines by adjusting the points For information on adjusting anchor points see Using the Pen tool on page 138 To display anchor points on a ...

Page 147: ...eshaping easier Increasing the magnification can also make reshaping easier and more accurate see Optimizing curves on page 149 or Using the Stage in Getting Started with Flash To reshape a line or shape outline using the Selection tool 1 Select the Selection tool 2 Do one of the following Drag from any point on the segment to reshape it Control click to drag Windows or Option click to drag Macint...

Page 148: ...articularly useful when you are having trouble reshaping a number of very short curved line segments Selecting all the segments and smoothing them reduces the number of segments producing a gentler curve that is easier to reshape Repeated application of smoothing or straightening makes each segment smoother or straighter depending on how curved or straight each segment was originally To smooth the...

Page 149: ... outline 3 Set additional options Use Multiple Passes repeats the smoothing process until no further optimization can be accomplished this is the same as repeatedly selecting Optimize with the same elements selected Show Totals Message displays an alert box that indicates the extent of the optimization when smoothing is complete 4 Click OK Erasing Erasing with the Eraser tool removes strokes and f...

Page 150: ...not selected 4 Drag on the Stage Modifying shapes You can modify shapes by converting lines to fills expanding the shape of a filled object or softening the edges of a filled shape by modifying the curves of the shape The Convert Lines to Fills feature changes lines to fills which allows you to fill lines with gradients or to erase a portion of a line The Expand Shape and Soften Edges features all...

Page 151: ...ng steps also creates larger files and slows drawing Expand or Inset controls whether the shape is enlarged or reduced to soften the edges Snapping To automatically align elements with one another you can use snapping Flash provides three ways for you to align objects on the Stage Object snapping lets you snap objects directly to other objects along their edges Pixel snapping lets you snap objects...

Page 152: ...Edit Preferences Windows or Flash Preferences Macintosh and click the Editing tab 2 Under Drawing Settings adjust the Connect Lines setting See Specifying drawing settings on page 154 Pixel snapping You can turn on pixel snapping using the Snap to Pixels command in the View menu If Snap to Pixels is on a pixel grid appears when the view magnification is set to 400 or higher The pixel grid represen...

Page 153: ...hen Snap Alignment is turned on dotted lines appear on the Stage when you drag an object to the specified snap tolerance For example if you set Horizontal snap tolerance to 18 pixels the default setting a dotted line appears along the edge of the object you are dragging when the object is exactly 18 pixels from another object If you turn on Horizontal Center Alignment a dotted line appears along t...

Page 154: ...other Smooth Curves specifies the amount of smoothing applied to curved lines drawn with the Pencil tool when the drawing mode is set to Straighten or Smooth Smoother curves are easier to reshape whereas rougher curves match the original line strokes more closely The selections are Off Rough Normal and Smooth Recognize Lines defines how nearly straight a line segment drawn with the Pencil tool mus...

Page 155: ...About Flash drawing models on page 131 To set Selection Subselection and Lasso tool contact options 1 Select Edit Preferences Windows or Flash Preferences Macintosh The Preferences dialog box is displayed 2 In the General category of the Preferences dialog box do one of the following Deselect Contact Sensitive Selection and Lasso tools if you want to select only objects and points that are complet...

Page 156: ...156 Drawing ...

Page 157: ...int size style color tracking kerning baseline shift alignment margins indents and line spacing See Setting text attributes on page 166 The Check Spelling feature lets you check spelling in text fields as well as in scene and layer names frame labels ActionScript strings and other places where text occurs in your document See Checking spelling on page 174 You can transform text as you would an obj...

Page 158: ... or input text field you can flow the text around an image including a SWF or JPG file or a movie clip See Using HTML formatted text in Learning ActionScript 2 0 in Flash You can use ActionScript to format input and dynamic text and to create scrolling text fields ActionScript has events for dynamic and input text fields that you can capture and use to trigger scripts For information on using Acti...

Page 159: ... or five within the first frame of a Flash document so be aware of the number of fonts you use FlashType font rendering may also cause an increase in the Flash Player s memory usage Using four or five fonts for example can increase memory usage by approximately 4 MB When Flash Player 8 is the selected version of Flash Player and Anti Alias for Readability or Custom Anti Alias is your chosen anti a...

Page 160: ...plication containing static text Flash creates outlines of the text and uses the outlines to display the text in Flash Player When you publish or export a Flash application containing dynamic or input text fields Flash stores the names of the fonts used in creating the text Flash Player uses the font names to locate identical or similar fonts on the user s system when the Flash application is disp...

Page 161: ...ers on page 172 About masking device fonts You can use a movie clip to mask text that is set in a device font and converted into a movie clip For a movie clip mask on a device font to function the user must have Macromedia Flash Player 6 6 0 40 0 or later When you use a movie clip to mask text set in a device font Flash uses the rectangular bounding box of the mask as the masking shape That is if ...

Page 162: ...types of text fields static dynamic and input All text fields support Unicode Static text fields display text that doesn t change characters dynamically Dynamic text fields display dynamically updating text such as sports scores stock quotes or weather reports Input text fields allow users to enter text in forms or surveys In Flash you can create horizontal text with a left to right flow or static...

Page 163: ... a round handle appears at the lower left corner of the text block For static vertical text with right to left orientation and a fixed height a square handle appears at the lower left corner of the text block For static vertical text that has left to right orientation and extends a round handle appears at the lower right corner of the text block For static vertical text with left to right orientat...

Page 164: ... and its contents appear in the SWF file To set preferences for vertical text 1 Select Edit Preferences Windows or Flash Preferences Macintosh and click the Editing tab in the Preferences dialog box 2 Under Vertical Text select Default Text Orientation to automatically give new text blocks vertical orientation 3 Select Right to Left Text Flow to make vertical text automatically flow right to left ...

Page 165: ... width or height 6 Select text attributes in the Property inspector as described in Setting text attributes on page 166 To change the dimensions of a text block Drag its resize handle When text is selected a blue bounding box lets you manually resize any text box by dragging one of its handles Static text boxes have four handles that let you resize the text box horizontally Dynamic text boxes have...

Page 166: ...ng text attributes You can set the font and paragraph attributes of text Font attributes include font family point size style color letter spacing autokerning and character position Paragraph attributes include alignment margins indents and line spacing You can optimize text to make it more readable at small sizes See About font outlines and device fonts on page 160 For static text font outlines a...

Page 167: ...ox and select a font from the list or enter a font name 5 Click the triangle next to the Point Size value and drag the slider to select a value or enter a font size value Text size is set in points regardless of the current ruler units 6 To apply bold or italic style click the Bold button or the Italic button 7 Click the Alias Text button directly below the Bold button to optimize text 8 To select...

Page 168: ...nd kerning will be applied to horizontal text only To set preferences for vertical text see Creating text on page 162 Using the Property inspector you can also apply superscript or subscript styles to your text To set letter spacing kerning and character position 1 Select the Text tool 2 To apply settings to existing text use the Text tool to select a text block or text blocks on the Stage 3 If th...

Page 169: ...ical columns To set alignment margins indents and line spacing for horizontal text 1 Select the Text tool 2 To apply settings to existing text use the Text tool to select a text block or text blocks on the Stage 3 Select Window Properties 4 In the Property inspector click Format Options and set the following options To set alignment click the Left Center Right or Full Justification button To set l...

Page 170: ...nti aliasing for each text field rather than each character Also when you open existing FLA files in Flash 8 the text is not automatically updated to the Advanced Anti Alias option you must select individual text fields and manually change the anti aliasing settings For more information see Upgrading Flash 7 content to use Flash 8 anti aliasing options on page 171 To select an anti aliasing option...

Page 171: ...asing transition appears Larger values cause the characters to look thicker Specifying Custom Anti Alias creates a larger SWF file because font outlines are embedded In order to use the Custom Anti Alias setting you must publish to Flash Player 8 and author your Flash content using Flash Professional 8 Upgrading Flash 7 content to use Flash 8 anti aliasing options When you open a FLA file created ...

Page 172: ...able by a user 1 Select the horizontal text that you want to make selectable by a user 2 Select Window Properties 3 In the Property inspector select Static Text or Dynamic Text Input Text is selectable by default 4 Click the Selectable button Using device fonts static horizontal text only When you create static text you can specify that Flash Player use device fonts to display certain text blocks ...

Page 173: ... 6 Optional If you want to use bitmap fonts for your font symbol select the Bitmap Text check box and enter a font size in the Size text box For information on bitmap text see Setting anti aliasing options for text on page 170 7 Click OK To assign an identifier string to a font symbol 1 Select the font symbol in the Library panel 2 Do one of the following Select Linkage from the options menu in th...

Page 174: ...t block 1 Select the Text tool 2 Do one of the following Drag to select characters Double click to select a word Click to specify the beginning of the selection and Shift click to specify the end of the selection Press Control A Windows or Command A Macintosh to select all the text in the block To select text blocks Select the Selection tool and click a text block Shift click to select multiple te...

Page 175: ... options for checking spelling To use Spelling Setup 1 Open the Spelling Setup dialog box Do one of the following Select Text Spelling Setup Use this option if you have not initialized the Check Spelling feature before In the Check Spelling dialog box Text Check Spelling click the Setup button 2 In the Spelling Setup dialog box select any of the items in the Document Options list to specify docume...

Page 176: ...orner identifies words not found in the selected dictionary or dictionaries and also identifies the type of element where the text is located such as text field frame label or other 2 Do one of the following Click the Add to Personal button to add the word to your personal dictionary Click Ignore to leave the word unchanged Click Ignore All to leave all occurrences of the word in the document unch...

Page 177: ...fort For example you can use Timeline effects to make text bounce fade in or out or explode For more information on using each effect see Using Timeline effects on page 244 Breaking text apart You can break apart text to place each character in a separate text block After you break text apart you can quickly distribute the text blocks to separate layers and animate each block separately For inform...

Page 178: ...RL to which you want to link the text block Preserving rich text formatting Flash lets you preserve rich text formatting in input and dynamic text fields If you select the Render Text as HTML formatting option in the Property inspector or set the html property of the TextField object to true Flash preserves basic text formatting such as font style color and size and hyperlinks in the text field by...

Page 179: ... a text field on the Stage Assign the text field an instance name in the Property inspector Use the ActionScript createTextField method to create a text field dynamically Assign the text field an instance name as a parameter of the createTextField method 2 Do one of the following Select the Render Text as HTML option in the Property inspector In the Actions panel set the html property of the TextF...

Page 180: ...select which fonts on your system are substituted for the missing fonts or you can let Flash substitute missing fonts with the Flash System Default Font specified in General Preferences If you install a previously missing font on your system and restart Flash the font is displayed in any documents using the font and the font is removed from the Missing Fonts dialog box Selecting substitute fonts A...

Page 181: ...In the Font Mapping dialog box click a font in the Missing Fonts column to select it Shift click to select multiple missing fonts to map them all to the same substitute font The default substitute fonts are displayed in the Mapped To column until you select substitute fonts 3 Select a font from the Substitute Font pop up menu 4 Repeat steps 2 3 for all missing fonts 5 Click OK Working with substit...

Page 182: ... the text field and its content using the TextField andTextFormat objects The TextField object has the same properties as the MovieClip object and has methods that let you set select and manipulate the text The TextFormat object lets you set character and paragraph values for the text You can use these ActionScript objects instead of the text Property inspector to control the settings of a text fi...

Page 183: ...racter is a breaking character such as Enter Windows or Return Macintosh Click the Selectable button to enable users to select dynamic text Deselect this option to prevent users from selecting the dynamic text Click the Render Text as HTML button to preserve rich text formatting such as fonts and hyperlinks with the appropriate HTML tags See Preserving rich text formatting on page 178 Click the Sh...

Page 184: ...ield receives a set of default properties The default properties of the new text field are as follows type dynamic border false background false password false multiline false html false embedFonts false variable null maxChars null After you create a text field you can use the TextFormat object to format the text You must create a new TextFormat object and then pass it as a parameter to the setTex...

Page 185: ...splayed in the Script pane _root createTextField mytext 1 50 50 200 100 6 In the Actions toolbox select the Built in Classes category then select the Movie category then select the TextField category and then select the Properties category Finally double click the text property to create a new line For this example replace the placeholder instanceName with myText in the Object parameter field 7 In...

Page 186: ... the Movie category then select the TextField category and then select the Properties category Finally double click the multiline property 5 Enter the following parameters Object is the instance name of the text field whose property you want to set Value is the value of the property 6 Repeat steps 4 and 5 for the wordWrap and border properties The following code appears in the Script pane mytext m...

Page 187: ...ethod 3 Do one of the following to place text in the text field Enter text into the text field on the Stage Set the text property of the TextField object See Creating text on page 162 In the Actions toolbox select the Built in classes category then select the Movie category and then select the TextFormat category Finally double click new TextFormat For this example enter myformat in the Object par...

Page 188: ...tage Assign the text field an instance name in the Property inspector Use ActionScript to create a text field dynamically with the createTextField method Assign the text field an instance name as a parameter of the createTextField method 2 In the Actions panel select the Built in Classes category in the Actions toolbox then select the Movie category then select the TextField category and then sele...

Page 189: ...ld an instance name in the Property inspector Use ActionScript to create a text field dynamically with the createTextField method Assign the text field an instance name as a parameter of the createTextField method 2 Create an Up button and a Down button or select Window Common Libraries Buttons and drag the buttons to the Stage You use these buttons to scroll the text up and down 3 Select the Up b...

Page 190: ...190 Working with Text ...

Page 191: ...s and edit it in Flash or convert the bitmap to vector artwork See Working with imported bitmaps on page 200 You can also import video into Flash See Chapter 11 Working with Video on page 271 For information on importing sound files in WAV Windows AIFF Macintosh and MP3 both platforms formats see Chapter 12 Working with Sound on page 311 This chapter contains the following sections Placing artwork...

Page 192: ...etafile Format WMF files that you import directly into a Flash document instead of into a library are imported as a group in the current layer See Importing file formats for vector or bitmap files on page 194 and Importing Adobe Illustrator EPS or PDF files on page 198 Bitmaps scanned photographs BMP files that you import directly into a Flash document are imported as single objects in the current...

Page 193: ...n 5 If the name of the file you are importing ends with a number and there are additional sequentially numbered files in the same folder select whether to import the sequence of files Click Yes to import all the sequential files Click No to import only the specified file The following are examples of filenames that can be used as a sequence Frame001 gif Frame002 gif Frame003 gif Bird 1 Bird 2 Bird...

Page 194: ... the following vector or bitmap file formats into Flash 8 regardless of whether QuickTime 4 is installed You can import the following bitmap file formats into Flash only if QuickTime 4 or later is installed File type Extension Windows Macintosh Adobe Illustrator version 10 or earlier see Importing Adobe Illustrator EPS or PDF files on page 198 eps ai pdf AutoCAD DXF see About AutoCAD DXF files on ...

Page 195: ...objects within Fireworks and continue to modify those filters and blends using Flash 8 Flash only supports modifiable filters and blends for objects imported as text and movie clips If an effect or blend mode is not supported Flash 8 will rasterize or ignore it when it is imported If you want to import a Fireworks PNG file that contains filters or blends that Flash does not support you must raster...

Page 196: ...layers are flattened into the single layer The Fireworks frames are contained in the new layer 6 For Objects select one of the following Rasterize if Necessary to Maintain Appearance preserves Fireworks fills strokes and effects in Flash Keep All Paths Editable keeps all objects as editable vector paths Some Fireworks fills strokes and effects are lost on import 7 For Text select one of the follow...

Page 197: ...creates clipping paths to simulate the appearance of a gradient fill Clipping paths can increase file size To minimize file size use gradient fills with eight colors or fewer in FreeHand When you import files with blends Flash imports each step in a blend as a separate path Thus the more steps a blend has in a FreeHand file the larger the imported file size will be in Flash When you import files w...

Page 198: ... For Options select any of the following options Include Invisible Layers imports all layers visible and hidden from the FreeHand document Include Background Layer imports the background layer with the FreeHand document Maintain Text Blocks preserves text in the FreeHand document as editable text in the Flash document 9 Click OK Importing Adobe Illustrator EPS or PDF files Flash can import Adobe I...

Page 199: ... Illustrator EPS or PDF from the Files of Type Windows or Show Macintosh pop up menu 3 Navigate to a file and select it 4 Click Open The Import Options dialog box appears 5 For Convert Pages select one of the following Screens in screens mode or Scenes in scenes mode converts each page to a screen or a scene Keyframes converts each page to a keyframe 6 For Convert Layers select one of the followin...

Page 200: ... support three dimensional DXF files Although Flash doesn t support scaling in a DXF file all imported DXF files produce 12 inch x 12 inch files that you can scale using the Modify Transform Scale command Also Flash supports only ASCII DXF files If your DXF files are binary you must convert them to ASCII before importing them into Flash Working with imported bitmaps When you import a bitmap into F...

Page 201: ...pixel dimensions and position on the Stage Using the Property inspector you can assign a new name to the bitmap and you can swap an instance of a bitmap that is replace the instance with an instance of another bitmap in the current document To display the Property inspector with bitmap properties 1 Select an instance of a bitmap on the Stage 2 Select Window Properties To assign a new name to a bit...

Page 202: ...at To use the default compression quality specified for the imported image select Use Document Default Quality To specify a new quality compression setting deselect Use Document Default Quality and enter a value between 1 and 100 in the Quality text box A higher setting preserves greater image integrity but yields a larger file size Lossless PNG GIF compresses the image with lossless compression i...

Page 203: ...r Linkage in the Linkage Properties dialog box select Export for ActionScript 4 Enter an identifier string in the text box and click OK Applying a bitmap fill You can apply a bitmap as a fill to a graphic object using the Color Mixer Applying a bitmap as a fill tiles the bitmap to fill the object The Fill Transform tool allows you to scale rotate or skew an image and its bitmap fill See Transformi...

Page 204: ...r the PNG source file or the bitmap file is to be opened 4 Perform the desired modifications to the file in Fireworks 5 In Fireworks select File Update 6 Return to Flash The file is automatically updated in Flash To edit a bitmap with another image editing application 1 In the Library panel right click Windows or Control click Macintosh the bitmap s icon 2 In the bitmap s context menu select Edit ...

Page 205: ...luded in the selection A higher number includes a broader range of colors If you enter 0 only pixels of the exact same color as the first pixel you click are selected For Smoothing select an option from the pop up menu to define how much the edges of the selection will be smoothed 3 Click the bitmap to select an area Continue clicking to add to the selection 4 Select the fill that you want to use ...

Page 206: ... RGB color values is less than the color threshold the two pixels are considered the same color As you increase the threshold value you decrease the number of colors 4 For Minimum Area enter a value between 1 and 1000 to set the number of surrounding pixels to consider when assigning a color to a pixel 5 For Curve Fit select an option from the pop up menu to determine how smoothly outlines are dra...

Page 207: ... 129 This chapter contains the following sections Selecting objects 208 Grouping objects 211 Moving copying and deleting objects 212 Stacking objects 215 Transforming objects 215 Flipping objects 221 Restoring transformed objects 221 Aligning objects 221 Breaking apart groups and objects 222 N OT E Graphic objects in Flash are different from ActionScript objects which are part of the ActionScript ...

Page 208: ...formation point If you select multiple items of different types on the Stage such as an object a button and a movie clip the Property inspector indicates a mixed selection The Property inspector for a mixed selection displays the pixel dimensions and x and y coordinates of the selected set of items You can use the Property inspector for a shape to change the object s stroke and fill See Chapter 4 ...

Page 209: ...lect everything on every layer of a scene Select Edit Select All or press Control A Windows or Command A Macintosh Select All doesn t select objects on locked or hidden layers or layers not on the current Timeline To deselect everything on every layer Select Edit Deselect All or press Control Shift A Windows or Command Shift A Macintosh To select everything on one layer between keyframes Click a f...

Page 210: ...re you want the first line to end and click Continue setting end points for additional line segments 4 To close the selection area double click To select objects by drawing both freehand and straight edged selection areas 1 Select the Lasso tool and deselect the Polygon Mode modifier 2 To draw a freehand segment drag the Lasso tool on the Stage 3 To draw a straight edged segment Alt click Windows ...

Page 211: ...g the objects To create a group 1 Select the objects on the Stage that you want to group You can select shapes other groups symbols text and so on 2 Select Modify Group or press Control G Windows or Command G Macintosh To ungroup objects Select Modify Ungroup or press Control Shift G Windows or Command Shift G Macintosh To edit a group or an object within a group 1 Select the group and then select...

Page 212: ...se the Info panel To move objects by dragging 1 Select an object or multiple objects 2 Select the Selection tool position the pointer over the object and do one of the following To simply move the object drag it to the new position To copy the object and move the copy Alt drag Windows or Option drag Macintosh To constrain the object s movement to multiples of 45 Shift drag To move objects using th...

Page 213: ...layer scene or file and then select Edit Paste in Place to paste the selection in the same position relative to the Stage About copying artwork with the Clipboard Elements copied to the Clipboard are anti aliased so they look as good in other applications as they do in Flash This is particularly useful for frames that include a bitmap image gradients transparency or a mask layer Graphics pasted fr...

Page 214: ...s See Scaling objects on page 219 Rotating objects on page 219 and Skewing objects on page 220 4 Click the Create Copy button in the Transform panel the left button in the lower right corner of the panel Deleting objects Deleting an object removes it from the file Deleting an instance on the Stage does not delete the symbol from the library To delete objects 1 Select an object or multiple objects ...

Page 215: ... object or group up or down one position in the stacking order If more than one group is selected the groups move in front of or behind all unselected groups while maintaining their order relative to each other Transforming objects You can transform graphic objects as well as groups text blocks and instances by using the Free Transform tool or the options in the Modify Transform menu Depending on ...

Page 216: ...move the transformation point during a transformation Drag the transformation point To realign the transformation point with the element s center point Double click the transformation point To switch the point of origin for a scale or skew transformation Alt drag Windows or Option drag Macintosh during the transformation To track the location of the transformation point in the Info panel and Prope...

Page 217: ... bounding box and drag the object to a new position Do not drag the transformation point To set the center of rotation or scaling drag the transformation point to a new location To rotate the selection position the pointer just outside a corner handle and drag The selection rotates around the transformation point Shift drag to rotate in 45 increments Alt drag Windows or Option drag Macintosh to ro...

Page 218: ...o distort objects when freely transforming them See Transforming objects freely on page 217 To distort graphic objects 1 Select a graphic object or objects on the Stage 2 Select Modify Transform Distort 3 Place the pointer on one of the transformation handles and drag 4 To end the transformation click outside the selected object or objects Modifying shapes with the Envelope modifier The Envelope m...

Page 219: ...nuniformly To scale the object either horizontally or vertically drag a center handle 4 To end the transformation click outside the selected object or objects Rotating objects Rotating an object turns it around its transformation point The transformation point is aligned with the registration point which defaults to the center of the object but you can move the point by dragging it NO T E The Enve...

Page 220: ...otate the object Drag a center handle to skew the object 4 To end the transformation click outside the selected object or objects To rotate objects by 90 1 Select the object or objects 2 Select Modify Transform Rotate 90 CW to rotate clockwise or Rotate 90 CCW to rotate counterclockwise Skewing objects Skewing an object transforms it by slanting it along one or both axes You can skew an object by ...

Page 221: ...transformed object to its original state 1 Select the transformed object 2 Select Modify Transform Remove Transform To reset a transformation performed in the Transform panel With the transformed object still selected click the Reset button in the Transform panel Aligning objects The Align panel enables you to align selected objects along the horizontal or vertical axis You can align objects verti...

Page 222: ... and bitmaps into ungrouped editable elements you use the Break Apart command Breaking apart significantly reduces the file size of imported graphics Although you can select Edit Undo immediately after breaking apart a group or object breaking apart is not entirely reversible It affects objects as follows It severs a symbol instance s link to its master symbol It discards all but the current frame...

Page 223: ...elect Modify Break Apart NO TE Breaking apart animated symbols or groups within an interpolated animation is not recommended and might have unpredictable results Breaking apart complex symbols and large blocks of text can take a long time You might need to increase the application s memory allocation to properly break apart complex objects ...

Page 224: ...224 Working with Graphic Objects ...

Page 225: ...bout filters Flash Professional only Filters let you add interesting visual effects to text buttons and movie clips and are most often associated with applying drop shadows blurs glows and bevels to graphic elements A feature unique to Flash is that you can animate the filters you apply using motion tweens For example if you create a ball or sphere with a drop shadow you can simulate the look of t...

Page 226: ...objects within Fireworks and continue to modify those filters and blends using Flash Professional 8 Flash only supports modifiable filters and blends for objects imported as text and movie clips If an effect or blend mode is not supported Flash will rasterize or ignore it when it is imported If you want to import a Fireworks PNG file that contains filters or blends that Flash does not support you ...

Page 227: ... type at the opposite end of the tween a matching filter is added automatically to ensure that the effect is at the end of the animation sequence Flash does the following to prevent motion tweens from functioning incorrectly in the event of a missing filter at one end of the tween or filters applied in a different order at each end If you apply a motion tween to a movie clip that has filters appli...

Page 228: ...are set differently between the beginning and end of the tween knockout inner shadow inner glow and type of gradient glow and gradient bevel For example if you create a motion tween using the drop shadow filter and apply a drop shadow with a knockout on the first frame of the tween and an inner shadow on the last frame of the tween Flash corrects the inconsistent use of the filter in the motion tw...

Page 229: ...you want to apply a filter to You can apply filters only to text button and movie clip objects 2 Select the Filter tab in the Property inspector 3 Click the Add Filter button and select a filter from the Filters pop up menu The filter you select is applied to the object and the controls for the filter settings appear in the Property inspector Experiment with the settings until you get the look you...

Page 230: ...he Filters pop up menu 4 Select the filter preset you want to apply from the list of available presets at the bottom of the preset menu To enable or disable a filter applied to an object Click the enable or disable icon next to the filter name in the Filter list in the Property inspector To enable or disable all filters applied to an object Click the Add Filter button in the Property inspector and...

Page 231: ...iguration Filters filtername xml To create a library of filters with preset settings 1 Apply the filter or filters you want to use to the object 2 When you have a filter setting that you want to save for use later click the Add Filter button and select Presets Save As from the Filters pop up menu 3 Enter a name for the filter settings in the Save Preset As dialog box and click OK The filter preset...

Page 232: ... object Click the Color box to open the Color pop up window and set the shadow color Drag the Strength slider to set the darkness of the shadow The higher the numerical value the darker the shadow Enter a value to set the angle of the shadow or click the angle selector and drag the angle dial Select the Knockout check box to knock out or visually hide the source object and display only the drop sh...

Page 233: ...uplicated object and skew it using the Free Transform tool Modify Transform Rotate and Skew 4 Apply the Drop Shadow filter to the duplicated movie clip or text object and select the Hide Object check box The duplicated object is hidden from view leaving only the skewed shadow 5 Adjust both the Drop Shadow filter settings and the angle of the skewed drop shadow until you achieve the look you want A...

Page 234: ...a movie clip or text object that you want to apply a glow to 2 Select the Filters tab in the Property inspector 3 Click the Add Filter button and select Glow from the pop up menu 4 Edit the filter settings in the Filter tab of the Property inspector Drag the Blur X and Y slider to set the width and height of the glow Click the color box to open the color pop up window and set the glow color Drag t...

Page 235: ...or 3 Click the Add Filter button and select Bevel from the pop up menu 4 Edit the filter settings in the Filter tab of the Property inspector Select the type of bevel you want to apply to the object from the Type pop up menu You can choose an inner outer or full bevel Drag the Blur X and Y slider to set the width and height of the bevel Select a shadow and highlight color for the bevel from the po...

Page 236: ...ffecting its width Drag the Angle dial or enter a value to change the angle of the shadow cast by the glow Drag the Distance slider to set the distance of the shadow from the object Select the Knockout check box to knock out or visually hide the source object and display only the gradient glow on the knockout image Specify a gradient color for the glow A gradient contains two or more colors that f...

Page 237: ...ab of the Property inspector Select the type of bevel you want to apply to the object from the Type pop up menu You can choose an inner outer or full bevel Drag the Blur X and Y slider to set the width and height of the bevel For Strength enter a value to affect the smoothness of the bevel without affecting its width For Angle enter a value or use the pop up dial to set the angle of the light sour...

Page 238: ...r from the pop up menu 4 Drag the slider for the color attributes you want to adjust or enter a numerical value in the corresponding text box The attributes and their corresponding values are as follows Contrast adjusts the highlights shadows and midtones of an image Values range from 100 to 100 Brightness adjusts the brightness of an image Values range from 100 to 100 Saturation adjusts the inten...

Page 239: ... the different blend modes to achieve the effect you want Flash provides the following blend modes Normal applies color normally with no interaction with the base colors Layer lets you stack movie clips on top of each other without affecting their color Darken replaces only the areas that are lighter than the blend color Areas darker than the blend color don t change Multiply multiplies the base c...

Page 240: ...he resulting effect of a blend mode may be considerably different depending on the color of the underlying image and the type of blend mode you apply NO T E Alpha blend mode requires that a Layer blend mode be applied to the parent movie clip You cannot change the background clip to Alpha and apply it because the object would appear invisible NO T E Erase blend mode requires that a Layer blend mod...

Page 241: ...y of the movie clip instance using the Color pop up menu in the Property inspector For more information see Changing the color and transparency of an instance on page 91 3 Select a blend mode from the Blend pop up menu in the Property inspector for movie clips The blend mode is applied to the selected movie clip instance Overlay Hard Light Add Subtract Difference Invert N OT E Multiple graphic sym...

Page 242: ...ify that the blend mode you selected is appropriate to the effect you re trying to achieve You might need to experiment with both the color and transparency settings of the movie clip and the different blend modes to achieve the effect you want For information on adjusting the color of a movie clip see Changing the color and transparency of an instance on page 91 ...

Page 243: ... can also create animation by changing the contents of successive frames in the Timeline You can make an object move across the Stage increase or decrease its size rotate change color fade in or out or change shape Changes can occur independently of or in concert with other changes For example you can make an object rotate and fade in as it moves across the Stage In frame by frame animation you cr...

Page 244: ...Timeline effect to an object Flash creates a layer and transfers the object to the new layer The object is placed inside the effect graphic and all tweens and transformations required for the effect reside in the graphic on the newly created layer The new layer automatically receives the same name as the effect appended with a number that represents the order in which the effect is applied out of ...

Page 245: ...alog box that appears for the effect view the effect preview based on default settings Modify the default settings as desired and then click Update Preview to view the effect with the new settings For more information see the next section 3 When the Timeline effect appears as desired in the preview window click OK Timeline effect settings Each Timeline effect manipulates a graphic or symbol in a s...

Page 246: ...ion delay in frames results in pause between copies Blur Creates a motion blur effect by changing the alpha value position or scale of an object over time Effect duration in frames Allow horizontal blur Allow vertical blur Direction of blur Number of steps Starting scale Drop shadow Creates a shadow below the selected element Color in hex RGB value Alpha transparency in percentage Shadow offset in...

Page 247: ...f effects to create Fade In Out Fly In Out Grow Shrink and Spin Left Right effects Effect duration in frames Move to position x y offset in pixels Change position by x y offset in pixels Scale lock to equally apply change in percentage unlock to apply x and or y axis change separately in percentage Rotate in degrees Spin number of times Times counterclockwise clockwise Change color select deselect...

Page 248: ...context menu About tweened animation Flash can create two types of tweened animation motion tweening and shape tweening In motion tweening you define properties such as position size and rotation for an instance group or text block at one point in time and then you change those properties at another point in time You can also apply a motion tween along a path See Tweening instances groups and type...

Page 249: ...nimation Flash stores the values for each complete frame For information on frame by frame animations see Creating frame by frame animations on page 264 About layers in animation Each scene in a Flash document can consist of any number of layers As you animate you use layers and layer folders to organize the components of an animation sequence and to separate animated objects so they don t erase c...

Page 250: ... empty keyframe is represented by an empty circle before the frame Subsequent frames that you add to the same layer have the same content as the keyframe To create a keyframe do one of the following Select a frame in the Timeline and select Insert Timeline Keyframe Right click Windows or Control click Macintosh a frame in the Timeline and select Insert Keyframe About representations of animation i...

Page 251: ... movies generally have a frame rate of 12 fps while the standard motion picture rate is 24 fps The complexity of the animation and the speed of the computer on which the animation is being played affect the smoothness of the playback Test your animations on a variety of machines to determine optimum frame rates Because you specify only one frame rate for the entire Flash document it s a good idea ...

Page 252: ...xt block is placed on a separate layer during the Distribute to Layers process For information on breaking text apart see Breaking text apart on page 177 New layers New layers created during the Distribute to Layers operation are named according to the name of the element that each contains A new layer containing a library asset such as a symbol bitmap or video clip is given the same name as the a...

Page 253: ...nces groups and type Additionally Flash can tween the color of instances and type creating gradual color shifts or making an instance fade in or out To tween the color of groups or type you must make them into symbols See Creating symbols on page 82 To animate individual characters in a block of text separately you place each character in a separate text block see Breaking text apart on page 177 I...

Page 254: ...m s color instance or text block only To tween the color of elements other than instances or text blocks use shape tweening See Tweening shapes on page 261 5 Click any frame in the tween s frame span and select Motion from the Tween pop up menu in the Property inspector Window Properties 6 If you modified the size of the item in step 4 select Scale to tween the size of the selected item 7 To produ...

Page 255: ...e Property inspector to synchronize the animation of graphic symbol instances with the main Timeline 11 If you re using a motion path select Snap to attach the tweened element to the motion path by its registration point To create a motion tween using the Create Motion Tween command 1 Select an empty keyframe and draw an object on the Stage or drag an instance of a symbol from the Library panel 2 ...

Page 256: ...ing the rate of change 6 To rotate the selected item while tweening select an option from the Rotate menu Select Auto to rotate the object once in the direction requiring the least motion Select Clockwise CW or Counterclockwise CCW to rotate the object as indicated and then enter a number to specify the number of rotations 7 If you re using a motion path select Orient to Path to orient the baselin...

Page 257: ...s to the motion path 2 Do one of the following Select the layer containing the animation and select Insert Timeline Motion Guide Right click Windows or Control click Macintosh the layer containing the animation and select Add Motion Guide from the context menu Flash creates a new layer above the selected layer with a motion guide icon to the left of the layer name 3 Use the Pen Pencil Line Circle ...

Page 258: ...you want to unlink 2 Do one of the following Drag the layer above the motion guide layer Select Modify Timeline Layer Properties and select Normal as the layer type in the Layer Properties dialog box Applying custom ease in ease out to motion tweens Flash Professional only The Custom Ease In Ease Out dialog box displays a graph representing the degree of motion over time Frames are represented by ...

Page 259: ... face the user on the Stage Scale Specifies custom ease settings for the scale of an animated object For example you can more easily customize the scale of an object so it appears to be moving away from the viewer then coming closer and then moving away again Color Specifies custom ease settings for color transitions applied to an animated object Filters Specifies custom ease settings for filters ...

Page 260: ...ng for All Properties check box is selected Unsupported easing curves Certain types of easing curves are not supported No part of the graph can represent a nonlinear curve such as a circle The Custom Ease dialog box automatically prevents moving a control point or a tangent handle to a position that would render an invalid curve All points must exist on the graph Control points cannot be moved bey...

Page 261: ...ndows or Command V Macintosh You can copy and paste the ease curve The copied curve remains available until you exit the Flash application Tweening shapes By tweening shapes you can create an effect similar to morphing making one shape appear to change into another shape over time Flash can also tween the location size color and opacity of shapes Tweening one shape at a time usually yields the bes...

Page 262: ...ween toward the end of the animation drag the slider up or enter a positive value between 1 and 100 By default the rate of change between tweened frames is constant Easing creates a more natural appearance of transformation by gradually adjusting the rate of change 7 Select an option for Blend Distributive creates an animation in which the intermediate shapes are smoother and more irregular Angula...

Page 263: ... For example if you re using three shape hints for a triangle they must be in the same order on the original triangle and on the triangle to be tweened The order cannot be abc in the first keyframe and acb in the second Shape hints work best if you place them in counterclockwise order beginning at the top left corner of the shape To use shape hints 1 Select the first keyframe in a shape tweened se...

Page 264: ... select a frame in the layer where you want the animation to start 2 If the frame isn t already a keyframe select Insert Timeline Keyframe to make it one 3 Create the artwork for the first frame of the sequence You can use the drawing tools paste graphics from the Clipboard or import a file 4 Click the next frame to the right in the same row and select Insert Timeline Keyframe or right click Windo...

Page 265: ...te a new blank keyframe select Insert Timeline Blank Keyframe or right click Windows or Control click Macintosh the frame where you want to place the keyframe and select Insert Blank Keyframe from the context menu To delete or modify a frame or keyframe do one of the following To delete a frame keyframe or frame sequence select the frame keyframe or sequence and right click Windows or Control clic...

Page 266: ... end of the sequence Using onion skinning Normally Flash displays one frame of the animation sequence at a time on the Stage To help you position and edit a frame by frame animation you can view two or more frames on the Stage at once The frame under the playhead appears in full color while surrounding frames are dimmed making it appear as if each frame were drawn on a sheet of translucent onion s...

Page 267: ...pointer Onion 2 displays two frames on either side of the current frame Onion 5 displays five frames on either side of the current frame Onion All displays all frames on either side of the current frame Moving an entire animation If you need to move an entire animation on the Stage you must move the graphics in all frames and layers at once to avoid realigning everything To move the entire animati...

Page 268: ...k to another mask You can also use ActionScript to create a mask layer from a movie clip A mask layer created with ActionScript can be applied only to another movie clip See Using movie clips as masks in Learning ActionScript 2 0 in Flash To create a mask layer 1 Select or create a layer containing the objects to appear inside the mask 2 With the layer selected select Insert Timeline Layer to crea...

Page 269: ... tweening to the object as described in Tweening shapes on page 261 If the mask object is a type object or graphic symbol instance apply motion tweening to the object as described in Tweening instances groups and type on page 253 4 When you ve completed the animation operation click in the Lock column for the mask layer to lock the layer again To animate a movie clip on a mask layer 1 Select the m...

Page 270: ...270 Creating Motion ...

Page 271: ...o Flash Video including information on how to create and publish Flash Video This chapter includes the following topics About video features in Flash 272 About using video in Flash 274 Video and the Property inspector 277 About digital video and Flash 278 Importing video using the Video Import wizard 284 Encoding video 293 Importing Flash Video files into the Library 299 About playing back externa...

Page 272: ... several content delivery network CDN providers to offer hosted services for delivering on demand Flash Video across high performance reliable networks Built with Flash Communication Server and integrated directly into the delivery tracking and reporting infrastructure of the CDN network FVSS provides the most effective way to deliver Flash Video to the largest possible audience without the hassle...

Page 273: ...ions for controlling the playback of video files Using the FLVPlayback component New to Flash Professional 8 the FLVPlayback component lets you quickly add a full featured FLV or MP3 playback control to your Flash movie FLVPlayback provides support for both progressive downloading and streaming FLV files FLVPlayback lets you easily create intuitive video controls for users to control video playbac...

Page 274: ...ay Pause and Seek behaviors as well as the buffer time and size for a given video file Because the video content is kept external to the other Flash content and the video playback controls it s relatively easy to update video content without republishing the SWF file Progressive downloading provides the following advantages over embedded video During authoring you need to publish only the SWF inte...

Page 275: ...and the video playback controls This lets you easily add or change content without having to republish the SWF file Streaming video with Flash Communication Server or FVSS provides the following advantages over embedded and progressively downloaded video Video playback starts sooner than it does using other methods of incorporating video Streaming uses less of the client s memory and disk space be...

Page 276: ...ed files in QuickTime video MOV Audio Video Interleaved file AVI Motion Picture Experts Group file MPEG or other formats depending on your system For information on file formats supported for importing embedded video see Supported file formats for video on page 278 Embedded video works best for smaller video clips with a playback time of less than 10 seconds If you are using video clips with longe...

Page 277: ... in SWF format The QuickTime file contains a Flash track but the linked video clip remains in QuickTime format For more information see Importing linked QuickTime video files on page 290 Video and the Property inspector You can use the Property inspector and the Embedded Video Properties dialog box to modify embedded and linked video clips The Property inspector lets you give the clip an instance ...

Page 278: ...ut the On2 VP6 and Sorenson Spark video codecs on page 280 Comparing the On2 VP6 and Sorenson Spark video codecs on page 281 About encoding video on page 281 Tips for creating Flash video on page 282 Supported file formats for video If you have QuickTime 7 for Apple Macintosh QuickTime 6 5 for Windows or DirectX 9 or later Windows only installed on your system you can import video clips in several...

Page 279: ... of the file cannot be imported You can still import the video without sound For more information on audio support in MPEG video see About audio support for MPEG video on page 279 About audio support for MPEG video Because MPEG encodes both the video and audio portions of a file into a single track encoding MPEG files as FLV files may result in the audio portion being removed or dropped This occur...

Page 280: ...des the best combination of video quality while maintaining a small file size If your Flash content dynamically loads Flash video using either progressive download or Flash Communication Server you can use On2 VP6 video without having to republish your SWF for Flash Player 8 as long as users use Flash Player 8 to view your content By streaming or downloading On2 VP6 video into Flash SWF versions 6...

Page 281: ...t encoding video Flash provides several video encoding solutions that let you encode your video clips into the FLV format Flash Video Import wizard The Flash Video Import wizard lets you encode video clips into the Flash Video FLV format when you import them However the Video Import wizard has limitations in that you can only encode one video clip at a time and the process of encoding can be both ...

Page 282: ...e motion compresses differently from footage of a soccer match Follow these guidelines to deliver the best possible Flash video Whenever possible always encode a file from its uncompressed form If you convert a precompressed digital video format into the FLV format the previous encoder can introduce video noise The first compressor has already performed its encoding algorithm on the video and has ...

Page 283: ...iment to find the best setting for your project Modem 160 x 120 Dual ISDN 192 x 144 T1 DSL cable 320 x 240 Know progressive download times You should know how long it is going to take to download your video While your video clip downloads you might want to have other content that appears and disguises the download For short clips you can use the following formula Pause download time play time 10 o...

Page 284: ...you select whether to import a video clip as a streamed progressively downloaded embedded or linked file Also depending on the location of your file the Video Import wizard provides a series of options for different deployments If the video clip you wish to import is located on your local computer you can browse to it and import the video You can also import a video stored on a remote web server o...

Page 285: ...r 4 Optional If the video you are deploying is not in FLV format the Import Video wizard displays the Encoding panel For information on encoding your video using the Import Video wizard see Selecting a video encoding profile on page 293 5 Select a skin for your video clip You can choose to Not use a skin with the video Select one of the predefined skins For more information see Selecting a predesi...

Page 286: ...at is already deployed to a Flash Communication Server or FVSS or you can select a video file that is stored locally on your computer and upload the video file to the server after importing it into your FLA file To import video for streaming 1 To import the video clip into the current Flash document select File Import Import Video The Import Video wizard is displayed 2 Select the video clip you wa...

Page 287: ...es your source video clip into the FLV format if it isn t already in FLV format and creates a video component on the Stage that you can use to test video playback locally 6 Upload the following assets to the FCS or FVSS hosting your video The FLV encoded video clip which is located in the same folder as the source video clip you selected with a flv extension The video skin if you chose to use a sk...

Page 288: ...ile 1 To import the video clip into the current Flash document select File Import Import Video The Import Video wizard is displayed 2 Select the video clip on your local computer that you want to import 3 Select the Embed Video in SWF and Play in Timeline check box 4 Choose the symbol type with which to embed the video within the SWF You can choose to embed the video as embedded video a movie clip...

Page 289: ...u can customize it by converting it into a MovieClip object that can be more easily controlled using ActionScript By default Flash expands the Timeline to accommodate the playback length of the video clip you are embedding 6 Optional If you want to edit the video clip using the Video Import wizard select the Edit Video First check box The Video Import wizard includes basic video editing options th...

Page 290: ...blish the SWF file as a QuickTime video You cannot display a linked QuickTime clip in SWF format The QuickTime file contains a Flash track but the linked video clip remains in QuickTime format For more information on publishing your Flash file as a QuickTime video see Specifying publish settings for QuickTime videos on page 476 You can scale rotate and animate a linked QuickTime video in Flash How...

Page 291: ...rectory path of a linked QuickTime video You can set the directory path of a linked QuickTime video clip in the library for the current Flash document To set the directory path of a linked QuickTime video clip 1 Select Window Library and select the desired linked QuickTime video 2 In the options menu in the upper right corner of the Library panel select Properties 3 Click Set Path in the Linked Vi...

Page 292: ...head 5 To play the video do one of the following Click the Play button in the button controls to play the video from the current playhead position Click Preview to play the video with the current in and out points 6 To create a clip with the current in and out points click Create Clip The clip appears in the scroll pane at the left of the Editing pane To create additional clips from the same file ...

Page 293: ...al preconfigured encoding profiles that you can use to encode your video In the Encoding panel you can select an encoding profile to determine the level of compression to be applied to the video clip The encoding profiles are based on the Flash Player version you intend to publish content for and the data rate at which you want your video content to be encoded If you choose an encoding profile usi...

Page 294: ...ng options 2 Select a video codec with which to encode your content from the Video codec pop up menu If you are authoring for Flash Player 6 or 7 choose the Sorenson Spark codec if you are authoring for Flash Player 8 choose the On2 VP6 codec 3 Select a frame rate By default Flash Video Encoder uses the same frame rate as the source video Macromedia recommends using the default frame rate unless y...

Page 295: ...g Low Medium or High to automatically select a Data Rate value When you select Low Medium and High from this menu the Maximum Data Rate text box updates to reflect the specified value Select Custom and enter a value in Kilobits Sec in the Maximum Data Rate text box 6 To resize the video clip do the following a Select the Resize video check box b Optional Select the Maintain Aspect Ratio check box ...

Page 296: ...ono 3 Click Next to move to the next panel of the Video Import wizard or select another of the Advanced Settings tabs to further modify the video clip Embedding cue points Flash Professional only Cue points cause the video playback to trigger other actions within the presentation For example you can create a Flash presentation that has video playing in one area of the screen while text and graphic...

Page 297: ...int in the video where you want to embed a cue point The video preview window lets you visually identify points in the video at which to insert a cue point You can also use the elapsed time counter located beneath the video preview window to locate specific points in time at which to embed cue points 5 When the playback head is positioned on a frame where you want to embed a cue point click the Ad...

Page 298: ...ll clip removing unwanted frames 1 From the Encoding panel of the Video Import wizard click Show Advanced Settings The Advanced Flash Video Encoding Options are displayed 2 If you haven t yet specified an encoding setting for the video clip do so now To learn more see Encoding video on page 293 3 Click the Crop and Trim tab The Crop and Trim tab is displayed 4 Enter values for the right left top a...

Page 299: ...s from an external source you should place your video inside of a movie clip symbol This way when you load FLV files dynamically you can adjust the dimensions of the movie clip to match the actual dimension of the FLV You can also scale the video by scaling the movie clip To import an FLV file into the Library do one of the following Select File Import Import to Library Select any existing video c...

Page 300: ...ities that are not available when using imported video as described in the following list You can use longer video clips in your Flash documents without slowing down playback External FLV files are played using cached memory which means that large files are stored in small pieces and accessed dynamically they do not require as much memory as embedded video files An external FLV file can have a dif...

Page 301: ...an embedded or linked video clip on the Stage 2 Select Window Properties Properties 3 In the Property inspector do any of the following Enter an instance name in the Name text box on the left side of the Property inspector Enter values for W and H to change the dimensions of the video instance Enter values for X and Y to change the position of the upper left corner of the instance on the Stage Cli...

Page 302: ...layback Behaviors are prewritten ActionScript scripts that you add to a triggering object to control another object Behaviors let you add the power control and flexibility of ActionScript coding to your document without having to create the ActionScript code Video behaviors let you play stop pause rewind fast forward show and hide a video clip To control a video clip with a behavior you use the Be...

Page 303: ... 39 5 If required select settings for the behavior parameters and click OK Default event and actions for the behavior appear in the Behaviors panel 6 In the Behaviors panel under Event click On Release the default event and select a mouse event from the menu If you want to use the On Release event leave the option unchanged Behavior Purpose Parameters Play Video Plays a video in the current docume...

Page 304: ...he FLVPlayback component does the following Provides a set of prefabricated skins with which to customize playback controls and the look and feel of the user interface Lets advanced users create their own custom skins Provides cue points that you can use to synchronize your video with the animation text and graphics within your Flash application Provides live preview of customizations Maintains a ...

Page 305: ...ponent at runtime to use the source FLV dimensions The default value is false bufferTime The number of seconds to buffer before beginning playback The default value is 0 contentPath A string that specifies the URL to an FLV or to an XML file that describes how to play the FLV Double click the Value cell for this parameter to activate the Content Path dialog box The default is an empty string If yo...

Page 306: ...mponent Flash Professional Only in the Components Language Reference totalTime The total number of seconds in the source FLV The default value is 0 If you use progressive download Flash uses this number if it is set to a value greater than zero Otherwise Flash tries to take the time from metadata volume A number from 0 to 100 that represents the percentage of maximum volume at which to set the vol...

Page 307: ... it is ready for serving from a web server Otherwise it is an absolute Windows or Macintosh file path If you specify an HTTP URL the FLV is a progressive download FLV If you specify a URL that is a Real Time Messaging Protocol RTMP URL the FLV streams from a Flash Communication Server FCS A URL to an XML file could also be a streaming FLV from FCS or from a Flash Video Streaming Service FVSS You c...

Page 308: ...tachVideo to attach the video stream to the Video object For more information see attachVideo Video attachVideo method in ActionScript 2 0 Language Reference Media components Flash Player 6 and 7 The media component suite consists of three components MediaDisplay MediaController and MediaPlayback With the MediaDisplay component adding media to your Flash documents is as simple as dragging the comp...

Page 309: ... streaming video and provide user control The MediaPlayback component provides the easiest and quickest way to add video and a controller to your Flash documents The MediaPlayback component combines the MediaDisplay and MediaController components into a single integrated component The MediaDisplay and MediaController component instances are automatically linked to each other for playback control Y...

Page 310: ...310 Working with Video ...

Page 311: ...You select compression options to control the quality and size of sounds in exported SWF files You can select compression options for individual sounds using the Sound Properties dialog box or define settings for all sounds in the document in the Publish Settings dialog box You can use sounds in shared libraries to link a sound from one library to multiple documents For more information see Using ...

Page 312: ...rary for the current document You can import the following sound file formats into Flash WAV Windows only AIFF Macintosh only MP3 Windows or Macintosh If you have QuickTime 4 or later installed on your system you can import these additional sound file formats AIFF Windows or Macintosh Sound Designer II Macintosh only Sound Only QuickTime Movies Windows or Macintosh Sun AU Windows or Macintosh Syst...

Page 313: ... best to import 16 bit sounds If you have limited RAM keep your sound clips short or work with 8 bit sounds instead of 16 bit sounds To import a sound 1 Select File Import Import to Library 2 In the Import dialog box locate and open the desired sound file Adding sounds to a document To add a sound to a document from the library you assign the sound to a layer and set options in the Sound controls ...

Page 314: ... previously applied effects Left Channel Right Channel plays sound in the left or right channel only Fade Left to Right Fade Right to Left shifts the sound from one channel to the other Fade In gradually increases the volume of a sound over its duration Fade Out gradually decreases the volume of a sound over its duration Custom lets you create custom in and out points of sound using the Edit Envel...

Page 315: ...or 15 minutes enter 60 Looping stream sounds is not recommended If a stream sound is set to loop frames are added to the file and the file size is increased by the number of times the sound is looped Adding sounds to buttons You can associate sounds with the different states of a button symbol Because the sounds are stored with the symbol they work for all instances of the symbol To add sound to a...

Page 316: ...Learning ActionScript 2 0 in Flash To use a sound in a Sound action you assign an identifier string to the sound in the Linkage Properties dialog box To assign an identifier string to a sound 1 Select the sound in the Library panel 2 Do one of the following Select Linkage from the options menu in the upper right corner of the panel Right click Windows or Control click Macintosh the sound name in t...

Page 317: ...king sound files smaller by removing unused sections To edit a sound file 1 Add a sound to a frame for more information see Adding sounds to a document on page 313 or select a frame that already contains a sound 2 Select Window Properties 3 Click the Edit button on the right side of the Property inspector 4 Do any of the following To change the start and end points of a sound drag the Time In and ...

Page 318: ...havior such as clicking the button select a target object the sound to be affected by the behavior and select settings for the behavior parameters to specify how the behavior executes To load a sound to a file using a behavior 1 Select the object such as a button that you want to use to trigger the behavior 2 In the Behaviors panel Window Behaviors click the Add button and select Sound Load Sound ...

Page 319: ...ox enter the linkage identifier and the instance name of the sound you want to stop and click OK 5 In the Behaviors panel under Event click On Release the default event and select a mouse event from the menu If you want to use the OnRelease event leave the option unchanged To stop all sounds using a behavior 1 Select the object such as a button that you want to use to trigger the Stop All Sounds b...

Page 320: ...ronization pop up menu When you play the SWF file the sound stops playing when it reaches the ending keyframe 6 To play back the sound simply move the playhead About the onSoundComplete event The onSoundComplete event of the ActionScript Sound object lets you trigger an event in a Flash application based on completing an attached sound file The Sound object is a built in object that lets you contr...

Page 321: ... in the Publish Settings dialog box These global settings are applied to individual event sounds or all stream sounds if you do not select compression settings for the sounds in the Sound Properties dialog box For more information see Publishing Flash documents on page 459 You can also override export settings specified in the Sound Properties dialog box by selecting Override Sound Settings in the...

Page 322: ...P3 compression option on page 323 Using the Raw compression option on page 324 Using the Speech compression option on page 324 4 Set export settings 5 Click Test to play the sound once Click Stop if you want to stop testing the sound before it finishes playing 6 Adjust export settings if necessary until the desired sound quality is achieved 7 Click OK The Default compression option uses the global...

Page 323: ...n imported MP3 file with the same settings the file had when it was imported 1 In the Sound Properties dialog box select MP3 from the Compression menu 2 Select Use Imported MP3 Quality the default setting Deselect this option to select other MP3 compression settings as defined in the following procedure To use MP3 compression 1 In the Sound Properties dialog box select MP3 from the Compression men...

Page 324: ... 3 For Sample Rate select an option to control sound fidelity and file size Lower rates decrease file size but can also degrade sound quality Rate options are described in the following list 5 kHz is barely acceptable for speech 11 kHz is the lowest recommended quality for a short segment of music and is one quarter of the standard CD rate 22 kHz is a popular choice for web playback and is half th...

Page 325: ...lash file and to reduce the size of the sound Get more out of the same sounds by applying different effects for sounds such as volume envelopes looping and in out points at different keyframes You can get a number of sound effects using only one sound file Loop short sounds for background music Do not set streaming sound to loop When exporting audio in embedded video clips remember that the audio ...

Page 326: ...rmats into Flash you instead import a proxy sound in a supported format such as MP3 or AIFF that is replaced with an external device sound that you specify You can use device sounds only as event sounds you can t synchronize device sounds with the Timeline Unlike device sounds you can synchronize standard sounds to the Timeline Flash Lite 1 0 and Flash Lite 1 1 do not support the following feature...

Page 327: ... a startDrag stopDrag event using Script Assist 331 About Script Assist Script Assist lets you build scripts by selecting items from the Actions toolbox the list on the left side of the Actions panel You can also select actions from the Add pop up menu The Actions toolbox separates items into categories such as actions properties and objects and also provides an index category that lists all items...

Page 328: ...e ActionScript using Script Assist 1 Select Window Actions The Actions panel appears 2 Click the Script Assist button The Actions panel enters Script Assist mode When Script Assist in enabled the Actions panel user interface and behaviors change in the following ways The Add button functions differently in Script Assist mode When the focus is on the ActionScript window it adds the selection after ...

Page 329: ...k a category in the Actions toolbox to display the actions in that category and then do one of the following double click an action drag it to the Script pane or right click Windows or Control click Macintosh and select Add to Script Click the Add button and select an action from the pop up menu Press Escape and a shortcut key For example Escape st adds a stop action To view a list of shortcut key...

Page 330: ... Assist mode you cannot replace all gotoAndPlay actions with gotoAndStop To pin a script to the Actions panel Click the Script Pin button The Actions panel displays the script in the Script pane even when you click away from the object or frame To resize the Actions toolbox or Script pane do one of the following Drag the vertical splitter bar that appears between the Actions toolbox and Script pan...

Page 331: ... the methods and functions used to create this example see Learning ActionScript 2 0 in Flash To create a startDrag stopDrag event using Script Assist 1 Create a new Flash document and save it as circle fla 2 Draw a circle on the Stage 3 Select the circle on the Stage and convert it into a movie clip symbol by doing one of the following Select Modify Convert to Symbol Drag the selection to the Lib...

Page 332: ...lready existing Layer 1 8 Rename Layer 1 by double clicking its name in the Timeline and typing the name Actions in its place 9 Select the first frame of the Actions layers 10 Select Window Actions to display the Actions panel and click Script Assist The Actions panel enters Script Assist mode 11 In the Actions Toolbox navigate to ActionScript 2 0 Classes Movie MovieClip Events onPress and double ...

Page 333: ...5 Click the Add button and select Global Functions MovieClip Control startDrag 16 Enter type into the Target text box 17 Select the Expression and Constrain to Rectangle check boxes 18 Enter the following values in the L T R and B text boxes L 0 T 0 R 300 B 300 These values constrain the movement of the movie clip 19 Click beneath the last line of the code currently inserted in the Actions panel ...

Page 334: ...the MyCircle movie clip instance and ensure that the Relative path radio button is selected Click OK 23 Click the Add button and select Global Functions MovieClip Control stopDrag The finished code looks like this this my_mc onPress function startDrag this false 0 0 300 300 this my_mc onRelease function stopDrag 24 Test your completed code by selecting Control Test Movie In the Test Movie window m...

Page 335: ... you author a screen based document the screens are arranged in a structured hierarchy that you create You structure the document by nesting screens in a branching tree You can easily preview and modify the structure of a screen based document You can create screen based documents of two types a Flash Slide Presentation suitable for sequential content such as a slide show or multimedia presentatio...

Page 336: ...onal only 356 About using the Movie Explorer with screens Flash Professional only 357 About using Timelines with screens Flash Professional only 357 About using ActionScript with screens Flash Professional only 357 About using components with screens Flash Professional only 360 Accessibility in the Flash screens authoring environment Flash Professional only 361 Understanding screen based documents...

Page 337: ...type of default screen in the document A Flash Slide Presentation uses the slide screen as the default screen type A slide screen has functionality designed for a sequential presentation A Flash Form Application uses the form screen as the default screen type A form screen has functionality designed for a nonlinear form based application Although each document has a default screen type you can inc...

Page 338: ...s the parent of that screen If a screen is nested several layers deep all the screens above that screen are its ancestors Screens that are at the same level are sibling screens All screens nested in another screen are its descendants A child screen contains all the content of its ancestor screens The Screen Outline pane for a Flash Slide Presentation containing screens nested three levels deep Abo...

Page 339: ...eens For more information see Screen class Flash Professional only Form class Flash Professional only and Slide class Flash Professional only in the Components Language Reference Slide screens let you create Flash documents with sequential content such as a slide show The default runtime behavior lets users navigate sequentially through slide screens using the left and right arrow keys Sequential ...

Page 340: ...lar FLA files for the following reasons The code that attaches to screens when you use behaviors often doesn t interact with other ActionScript you might write you can place behaviors there and you might not have to worry about editing the code further which is ideal The code placed directly on screens is easy to locate and view the hierarchy of because of the Screen Outline pane Therefore it is e...

Page 341: ...xternal AS files to avoid complexity Placing ActionScript directly on screens is acceptable but avoid placing ActionScript on instances on the Stage You can create a class that extends the Form class For example you could write a class called MyForm In the Property inspector you would change the class name from mx screens Form to MyForm The MyForm class would look similar to the following code cla...

Page 342: ... a document see Selecting and moving screens Flash Professional only on page 351 To hide or show the Screen Outline pane Select Window Other Panels Screens To expand or collapse the tree In Windows click the Plus or Minus button next to a screen to show or hide the screens nested within it On the Macintosh click the triangle next to a screen to show or hide the screens nested within it To resize t...

Page 343: ...form screen as the default screen type For more information see Slide screens and form screens Flash Professional only on page 339 When you create a new screen based document it contains a top level container screen and a single screen of the default type Keep in mind that a screen based document can be published only Flash Player 6 format or later with ActionScript 2 0 You cannot save a screen ba...

Page 344: ...screen The new screen is a sibling screen of the selected screen You can also add a nested screen one level below the currently selected screen You can add a screen of the default screen type or select a screen type when you add a screen You can view all screens in a document in the Screen Outline pane For more information see Using the Screen Outline pane Flash Professional only on page 342 When ...

Page 345: ...reen button at the top of the Screen Outline pane Select Insert Screen Select Insert Screen from the screens context menu To add a screen of a specified type at the current screen level 1 Select a screen in the Screen Outline pane 2 Select Insert Screen Type from the context menu and select a screen type To add a nested screen of the default type 1 Select a screen in the Screen Outline pane 2 Do o...

Page 346: ...ol a screen For more information see About using ActionScript with screens Flash Professional only on page 357 If you change the default screen name the instance name is updated with the new name likewise if you change the instance name the screen name is updated The linkage identifier for the screen is also identical to the screen name and it is updated when the screen name or instance is updated...

Page 347: ... Snap option to make sure the registration point stays in the same relative position when the screen width and height change For more information see Specifying the ActionScript class and registration point of a screen Flash Professional only on page 348 The x and y coordinates of a screen are specified in pixels You can move a child screen on the Stage by changing its x and y coordinates You can ...

Page 348: ...on point grid indicates the position of the screen registration point in relation to its content By default the registration point of a slide screen is in the center and Auto Snap is on The registration point of a form screen is in the upper left corner and Auto Snap is off by default You can change the registration point using the grid You can use the Auto Snap option to keep the registration poi...

Page 349: ...erty inspector you can set parameters to control how the screen appears and behaves during playback Different parameters are available for slide and form screens The following parameters are available only for slide screens The parameter autoKeyNav determines whether the slide uses default keyboard handling to control navigation to the next or previous slide When autoKeyNav is set to true pressing...

Page 350: ...her a screen is visible or hidden at runtime When visible is set to true the screen is visible at runtime When visible is set to false the screen is hidden This property does not affect the visibility of the screen in the authoring environment The following parameters are available for slide and form screens The parameter autoload indicates whether the content should load automatically true or wai...

Page 351: ...ents of a slide screen when its parent appears by deselecting this option When the Hide Screen context menu option is deselected you can select the child slide screen on the Stage This feature affects display during authoring only not runtime playback The Hide Screen context menu option is deselected for form screens by default You can turn the option on to hide child form screens in the display d...

Page 352: ...ide Screen context menu option is deselected See the previous procedure 2 Select the parent screen in the Screen Outline pane 3 Click in the contents of the child screen on the Stage To edit an item on an ancestor screen of the current screen Double click the item in the Document window The Smart Clicking feature shows the ancestor screen in the Document window and selects the item for editing To ...

Page 353: ...reen Do one of the following Right click Windows or Control click Macintosh the screen and select Cut or Delete from the context menu Select the screen and click the Delete Screen button at the top of the Screen Outline pane Press Backspace Windows or Delete Macintosh Creating controls and transitions for screens with behaviors Flash Professional only You can create controls and transitions for sc...

Page 354: ... behavior from the submenu 4 If the behavior requires that you select a target screen the Select Screen dialog box appears Select the target screen in the tree control Click Relative to use a relative target path or Absolute to use an absolute target path and click OK For information on target paths see Using absolute and relative target paths on page 39 5 In the Event column click in the row for ...

Page 355: ...he transition Follow these guidelines when adding transitions For most situations the In option is recommended Use the In option when applying a transition that uses the on reveal event Use the Out option when applying a transition that uses the on hide event Do not add an Out transition immediately before an In transition in a presentation To attach the same transition to all children of a given ...

Page 356: ...e with screens Flash Professional only You can use the Find and Replace feature to find and replace a specified element in a Flash document that uses screens You can search for a text string font color symbol sound file video file or imported bitmap file You can search for elements in the entire document or in the current screen To use Find and Replace with a document containing screens 1 Select E...

Page 357: ... frames or layers You cannot view or modify the main Timeline of a screen based document You can add frames keyframes and layers and manipulate content on a screen s Timeline For information on working with the Timeline see Using the Timeline on page 58 In the Timeline nested screens work much as nested movie clips do with some exceptions For more information see How screens interact with ActionSc...

Page 358: ...e the instance name the screen name and the linkage identifier also update For more information see Setting properties and parameters for a screen Flash Professional only on page 347 The class name identifies the ActionScript class to which the screen is assigned By default a slide screen is assigned to the mx screens Slide class and a form screen is assigned to the mx screens Form class You can a...

Page 359: ...select the screen expand the Timeline collapsed by default and select the first frame in the Timeline However it s usually best to use an external ActionScript file rather than a frame action for complex code on a screen You cannot view or manipulate the main Timeline for a screen based document However you can target the main Timeline using _root in a target path Each screen is automatically asso...

Page 360: ...ured applications that show data and enable nonlinear user interactivity For example you can use forms to populate a container component When you use components with screens you can use the Focus Manager to create custom navigation between components The Focus Manager specifies the order in which components receive focus when a user presses the Tab key to navigate in an application For example you...

Page 361: ...ther documents with one exception when keyboard shortcuts are used to navigate panels Control Alt Tab in Windows or Command Option Tab on the Macintosh the Screen Outline pane receives focus the first time the keyboard shortcut is used For other documents the Timeline receives focus first To cycle through individual screens in the Screen Outline pane you use the arrow keys The Screen Outline pane ...

Page 362: ...362 Working with Screens Flash Professional Only ...

Page 363: ...onts on page 366 You can use a Western style keyboard to create text on the Stage in Chinese Japanese and Korean For more information see Using a Western keyboard to enter Asian characters on the Stage on page 381 If you have Unicode fonts installed on your system you can enter text directly into a text field Because the fonts are not embedded your users must also have Unicode fonts For more infor...

Page 364: ...files that are not Unicode encoded 385 Selecting an encoding language All text in a computer is encoded as a series of bytes Many different forms of encoding and therefore different bytes represent text Different kinds of operating systems use different kinds of encoding for text For example Western Windows operating systems usually use CP1252 encoding Western Macintosh operating systems usually u...

Page 365: ...all text it encounters is Unicode encoded If your document loads external text or XML files the text in these files should be UTF 8 encoded You can create these files using the Strings panel or in a text or HTML editor such as Macromedia Dreamweaver that can save the files in Unicode format Flash Player 7 and later supports the 8 bit Unicode format UTF 8 and the 16 bit Unicode formats UTF 16 BE Bi...

Page 366: ...ystem running the player If the text in a SWF file contains glyphs that are not supported by the specified font both Flash Player 7 and Flash Player 8 attempt to locate a font on the user s system that supports those glyphs It is not always possible for the player to locate an appropriate font The behavior of this function depends on the fonts available on the user s system as well as on the opera...

Page 367: ...ernal maximum number of glyphs for the authoring tool a warning dialog box appears To embed font sets from text on the Stage 1 Select the text on the Stage 2 In the Property inspector Window Properties click the Character button to show the Character Embedding dialog box 3 Select the character sets you want to embed 4 Click the AutoFill button 5 Click OK The glyphs for the selected fonts are embed...

Page 368: ...p between a particular language and all the necessary Unicode glyph ranges as shown in the following Korean examples The font set groupings are based upon the Unicode Blocks as defined by the Unicode Consortium They are organized in Flash in a manner that makes selection quick and easy To provide a simpler workflow when you select a particular language all related glyph ranges are embedded even if...

Page 369: ... characters punctuations and special characters symbols Traditional Chinese Level 1 5000 most commonly used Traditional Chinese characters used in Taiwan Traditional Chinese All All Traditional Chinese characters used in Taiwan and Hong Kong and punctuations Simplified Chinese Level 1 6000 most commonly used Simplified Chinese characters used in mainland of China and punctuations Chinese All All T...

Page 370: ...n you save test or publish the application a folder with an XML file is created for each language For more information see Selecting languages for translation on page 371 4 In the Strings panel encode each text string with an ID For more information see Adding strings to the Strings panel on page 372 5 Publish the application Latin Extended Add l Latin Extended Additional range 0x1E00 to 0x1EFF in...

Page 371: ...to show the text on the Stage in any of the languages you selected The selected language appears when you publish or test the file When selecting languages you can use any of the languages provided in the pop up menu as well as any other Unicode supported language To select a language 1 Select Window Other Panels Strings to open the Strings panel 2 Click the Settings button to show the Settings di...

Page 372: ... button The language no longer appears in the Active languages field 4 Repeat step 3 until you have removed all the languages you want 5 When you are done removing languages click OK The column for each removed language no longer appears in the Strings panel Adding strings to the Strings panel There are several ways to assign text strings to the Strings panel you can assign a string ID to a dynami...

Page 373: ...o a text field perform the steps in the following procedure To assign an existing ID to a text field 1 Select the Text tool from the toolbar On the Stage create an input or dynamic text field 2 Type the name of an existing ID in the ID section of the Strings panel 3 Click Apply The String text field on the Stage appears with the text string assigned to the ID N OT E If a static text field is selec...

Page 374: ...ngs on the Stage in the language selected as the Stage language using features such as find and replace see Finding and replacing text on page 49 and spelling checking see Using the Check Spelling feature on page 176 Text that is changed using these features is changed on the Stage and in the Strings panel You can edit the XML file directly For more information see Translating text in the Strings ...

Page 375: ... Settings button to display the Settings dialog box 3 Select the Replace Strings Automatically at Runtime check box 4 Click OK All instances of input and dynamic text are replaced with the translated strings when you publish your SWF file Using automatic language detection with the default language You can change the default runtime language to any language that you have selected as an available l...

Page 376: ...d Flash developer with knowledge of ActionScript you can invoke text replacement at a time that you designate by creating your own custom component or using ActionScript to access the language XML files For example you might create a pop up menu that lets users select the language of their choice to view content For information on writing ActionScript to create custom language detection see About ...

Page 377: ...ines a specification for an extensible localization interchange format that lets any software provider produce a single interchange format that can be delivered to and understood by any localization service provider For more information about XLIFF see www oasis open org committees xliff XLIFF examples If any of the following characters are entered in the Strings panel they are replaced by the app...

Page 378: ...t trans unit id 002 resname IDS_MAILING LIST source Would you like to be on our mailing list source trans unit trans unit id 003 resname IDS_SEE YOU source see you soon source trans unit trans unit id 004 resname IDS_TEST source source trans unit body file xliff French version sample xml version 1 0 encoding UTF 8 DOCTYPE xliff PUBLIC XLIFF DTD XLIFF EN http www oasis open org committees xliff doc...

Page 379: ... Strings panel on page 380 To translate text in the Strings panel 1 Select Window Other Panels Strings to open the Strings panel 2 For each language to be translated select the appropriate language column then type the translated text for that language to be associated with each string ID 3 To show the text on the Stage in the language you selected select the language in the Stage Language field 4...

Page 380: ...ML to show the Import XML dialog box 3 In the Select a Language pop up menu select the language of the XML file you are importing and click OK 4 Navigate to the folder and XML file to import The XML information is loaded into the column in the Strings panel for the language you selected in step 3 Regardless of where the XML file you imported was located when you save test or publish the Flash docu...

Page 381: ...ee XMLConnector component Flash Professional only in the Components Dictionary Using a Western keyboard to enter Asian characters on the Stage With Flash you can enter Asian characters on the Stage using a standard Western keyboard by using Input Method Editors IMEs Flash supports more than two dozen IMEs For example if you want to create a website that will reach a broad range of Asian viewers yo...

Page 382: ...time using the loadVariables action the getURL action the LoadVars object or the XML object You should save the external file in UTF 8 recommended UTF 16BE or UTF 16LE format using an application that supports the format If you are using UTF 16BE or UTF 16LE format the file must begin with a BOM to identify the encoding format to Flash Player For more information see Unicode encoding formats suppo...

Page 383: ...mation see getURL function in ActionScript 2 0 Language Reference Use the LoadVars object a predefined client server object to load an external text file from a specified URL For more information see LoadVars in ActionScript 2 0 Language Reference Use the XML object a predefined client server object to load an external XML file from a specified URL For more information see XML in the ActionScript ...

Page 384: ...ng documents with multilanguage text using text variables You can include Unicode encoded contents in text variables using the syntax uXXXX where XXXX is the four digit hexadecimal code point or escape character for the Unicode character The Flash authoring tool supports Unicode escape characters through uFFFF To find the code points for Unicode characters refer to the Unicode Standard at www Unic...

Page 385: ...erpret some external files as Unicode and some as other encoding because this can yield unexpected results If you set the system useCodepage property to true remember that the traditional code page of the operating system running the player must include the glyphs used in your external text file for the text to appear For example if you load an external text file that contains Chinese characters t...

Page 386: ...386 Creating Multilanguage Text ...

Page 387: ...ture There are four main layers in the Flash data integration architecture The data binding layer provides a way to map data elements to properties of Flash data components which can then be mapped to UI components In other words you bind to a data source and then select the elements you need to display in your application and to update the source Flash also integrates objects such as formatters a...

Page 388: ...rent elements that comprise the Flash data architecture Data binding is represented by the red arrows between the components As shown in the diagram you will need to set up data bindings between properties of UI controls and properties of a DataSet component between the DataSet component and a connector component between the DataSet component and a resolver component and between a resolver and a c...

Page 389: ... might best be addressed by a database administrator see Advanced topics in data integration on page 431 For more information see the following topics in this chapter Additional resources 390 Creating a simple application 391 Workflows for using the data components 393 Data binding Flash Professional only 394 Data connectivity Flash Professional only 412 Data management Flash Professional only 419...

Page 390: ...Search Application www macromedia com devnet mx flash articles google_search html XMLConnector XML Tutorial Timesheet Timesheet Tutorial in Flash Help Bike Trips Sample www macromedia com devnet mx flash articles xmlconnector html Data Integration Using ASP www macromedia com devnet mx flash articles flashpro_asp html XUpdateResolver XUpdate Tutorial Update the Timesheet RDBMSResolver Time Entry A...

Page 391: ... to Macintosh HD Applications Macromedia Flash 8 Samples and Tutorials Samples DataIntegration DinnerMenu 2 In Flash create a new Flash document and save it as dinner_menu fla in the Dinner Menu folder you created in step 1 3 Create the user interface which consists of two components a button that triggers data retrieval and a data grid to display the data a From the Components panel add a DataGri...

Page 392: ...ct the DataSet component and click the Bindings tab You see the binding to the xmlConn instance that you just added Now add two new bindings a Bind the DataSet s dataProvider property to the DataGrid s dataProvider property click the plus sign select the dataProvider Array property click Bound To click the magnifying glass icon select DataGrid then select the dataProvider Array property Select out...

Page 393: ...e Stage Add a connector component Add a DataSet component which you will bind to your data source and UI components Add UI components that will display data to users such as a DataGrid component Add a resolver component 3 Set up the connector component Set component parameters Set component properties on the Schema tab 4 Bind the connector component to DataSet component 5 Set up the DataSet compon...

Page 394: ...class 8 Add additional UI components and ActionScript code for the resolver functionality that is for adding editing or deleting data records Bind UI components to resolver components Data binding Flash Professional only Data binding lets you map the properties of one component to another component A binding is simply a statement that says When property X of component A changes copy the new value ...

Page 395: ... and myInput_txt are bound to each other In a real world application you would most likely import a schema define additional bindable component properties and create multiple bindings between data components and UI components To connect UI components to create data binding 1 Add a NumericStepper component to the Stage and name it stepper1_nm 2 Add another NumericStepper component and name it stepp...

Page 396: ...evnet mx flash data_integration html Working with schemas in the Schema tab Flash Professional only The Schema tab in the Component inspector lets you view and edit the schema for each data related component in your application The Schema tab lists the component s bindable properties which are properties to which you can bind that commonly contain dynamic data All components have properties but by...

Page 397: ...of data but is independent of how the data is actually stored For example the results from a WebServiceConnector component or an XMLConnector component could have identical schemas even though the web service results are stored as ActionScript data structures objects arrays strings Boolean values and numbers and the XMLConnector component results are stored as XML objects When you use data binding...

Page 398: ...onal only on page 416 For a WebServiceConnector component you can import the WSDL for a web service to define the schema See Connecting to web services with the WebService connector component Flash Professional only on page 413 For a DataSet component which is typically the intermediary component between your connector components and UI components you define the schema using the Schema panel See A...

Page 399: ...ponent Property button at the upper left of the Schema tab to add a component property 4 In the Schema Attributes pane the bottom pane of the Schema tab enter editable for the field name value and select Boolean for the data type value 5 Click the Bindings tab and click the Add Binding button to add a binding 6 In the Add Binding dialog box select the editable property and click OK 7 In the Bindin...

Page 400: ...bfields attributes or both Attributes are preceded with in the list Schema item of type Array which has one subfield called n representing the index of the array which can be of any type including Object String and so on Schema item of other types such as Boolean String Number which don t have subfields but can have attributes Attributes are preceded with in the list About handling data types in d...

Page 401: ... component according to the Kind setting At this point the data is in whatever format the component provides the raw form of the data For example the XMLConnector component always provides data as a string the NumericStepper component provides data as a Number and so on Store raw data into component Fetch raw data from component Kind Convert into raw form Convert from raw form Encoder maybe Conver...

Page 402: ...these four attributes occurs when the data field is accessed with data binding It is possible to directly access a component property from your ActionScript code but when you do this you re working with the raw value of the data not the data value that results from the action of data types encoders formatters and kinds For more information see the DataType class Flash Professional only in the Comp...

Page 403: ...ists the properties exposed for binding represented by their schema location of the component that s selected on the Stage and contains Add Binding and Remove Binding buttons The bottom pane shows information about settings for the selected property such as what it s bound to and in which direction it s bound To walk through the steps of creating bindings see A simple binding example on page 395 T...

Page 404: ...s a read write property See Configuring bindings on page 405 To walk through the steps of creating a binding see Creating a simple application on page 391 which creates a simple data application or A simple binding example on page 395 which demonstrates how bindings connect two UI components In general follow these steps to add a binding 1 Select the component on the Stage for which you want a bin...

Page 405: ...chema tab in is represented by a left pointing arrow Out The selected schema item is the source of a binding Whenever its value changes the value is copied to the other end of the binding On the Schema tab out is represented by a right pointing arrow In Out New data values are copied when either end of the binding changes value On the schema tab in out is represented by a two headed arrow Bound To...

Page 406: ...document root a single component path tree appears relative to the document root If the Stage shows the contents of a movie clip being edited from the library two component path trees appears The first appears from the root of the symbol being edited and the second appears from the document root allowing bindings to instances within the document NO T E Component instances are displayed only if the...

Page 407: ...en the Direction attribute for the binding is set to In Creating an indexed binding In the example application created in Creating a simple application on page 391 the data grid displays the dinner menu The description of each food item however is too long to fit in the data grid Ideally the user could click an item in the data grid and read the full description of a food item perhaps in a text bo...

Page 408: ...ray Notice that on the Bindings tab the attribute Index for food is dynamically added as shown in the following image you ll fill in this value in a later step 4 With the results dinner_menu food n description String field selected on the Bindings tab click Bound To click the magnifying glass icon select myTextArea and select the text string property The text area will be populated by the descript...

Page 409: ...ick different items in the data grid The text area updates with the detailed description for each food item Each time the user selects a new item in the data grid the index of the array is updated to show the data associated with the new item Sometimes you might need to manually define a schema that identifies a schema item as a field of an object contained within an array In the following example...

Page 410: ...ctions that occur in response to events such as the following The data of a component property changes A web service call is completed An XML document is fetched You can create a log of all actions that are performed by data binding or web services To create the log create a new Log object by adding the following code to the first frame in your Flash document _global __dataLogger new mx data bindi...

Page 411: ...ash Professional only in the Components Language Reference Data binding in Flash Player 7 versus Flash Player 6 Bindings between components are executed based on default component events for example a binding between the selectedIndex of a DataGrid and a DataSet is executed whenever a new record is selected in the DataGrid or DataSet After the event is generated the binding is queued to be execute...

Page 412: ...XML through HTTP such as JSP ASP Servlet or ColdFusion In addition to or instead of using these connector components advanced developers and database administrators can use the WebServices classes to write ActionScript code that accesses remote procedure calls exposed by a server using Simple Object Access Protocol SOAP For more information see Web service classes Flash Professional only in Compon...

Page 413: ... You can load and view the schema of any web service by entering the URL into the WSDLURL parameter of a WebServiceConnector component instance The following example demonstrates how to load and view the schema for a web service that provides helpful tips for different products You add a WebServiceConnector component instance on the Stage specify the web service to use and view the web service s s...

Page 414: ...variety of UI controls to let users input values for the parameters and to get back and display the results of the web service To see this web service in action see the Tips application in the following location In Windows browse to boot drive Program Files Macromedia Flash 8 Samples and Tutorials Samples DataIntegration MacromediaTips On the Macintosh browse to Macintosh HD Applications Macromedi...

Page 415: ...r the connectivity layer of your application you can use the Web Services panel to manage your web services The following illustration shows the Web Services panel to which several web services have been added A web service is represented by the planet icon and its operations appear in the tree To add edit the name of or remove a web service 1 Click Define Web Services the planet icon at the top o...

Page 416: ...ual sample of real data or if you know XML scripting create a sample yourself You import that sample XML file using the Component inspector Be sure that the sample you use contains all the elements you want for data binding and accurately represents the real data Different XML structures result in different schemas For example if your sample contains an array with only one item Flash won t know th...

Page 417: ...r component is an XML object The root element of that object is called Inventory which contains the elements Vendor Categories and so on The Vendor element contains a single element called Name which is a string The Categories field contains an element called Birds which contains the attribute labelname The Birds element also contains an array of objects called Bird Each of these objects has two a...

Page 418: ...llowing tutorials on Macromedia DevNet Bike Trips Sample at www macromedia com devnet mx flash articles xmlconnector html and Data Integration Using ASP at www macromedia com devnet mx flash articles flashpro_asp html About data connectivity and security in Flash Player Many developers are interested in using an industry standard such as SOAP web services as the data exchange mechanism between the...

Page 419: ...he server is the ideal place for business logic that can determine the best way to respond to requests for data and the results that should be sent back to the client This is also the most secure way to build an application The server can provide additional processing to make sure that users have access only to certain services as well as protect the client from making calls to malicious services ...

Page 420: ...schema properties in your code For more information see Making data binding classes available at runtime Flash Professional only in Components Language Reference For a tutorial that uses the DataSet component see the DevNet article Flash Data Integration Using Microsoft Active Server Pages ASP at www macromedia com devnet mx flash articles flashpro_asp html The DataSet component works only with Fl...

Page 421: ...illustration shows the flow of data through a UI component DataSet and Resolver component and the DeltaPacket object produced For a common workflow and information on how you use the methods properties and events of the DataSet component to manage your data see Using the DataSet component DataSet class Flash Professional only and the DeltaPacket interface Flash Professional only in the Components ...

Page 422: ...mponents Language Reference The objects can be sophisticated client side objects that mirror their server side counterparts or in their simplest form a collection of anonymous objects with public properties representing the fields within a record of data The DataSet component uses functionality in the DataBinding classes If you intend to work with the DataSet component in ActionScript only without...

Page 423: ...set component instance function getSQLData_Result result myDataset dataProvider result Array of objects returned from a web service The following illustration shows an example of using the Component inspector to bind an array of objects returned from the web service represented by the myWsc instance of the WebServiceConnector component The illustration on the left shows the schema of the web servi...

Page 424: ...Script array The illustration on the right shows how the results datapacket row array is bound to the dataProvider property of the myDataset instance of the DataSet component Accessing the data After the data is loaded into the DataSet component and the schema for the DataSet component has been defined the data can be accessed You can access data at runtime or at design time Runtime example Access...

Page 425: ...a types Num Makes the first item the current item myDataSet first Traces through the properties while myDataSet hasNext access the data through the Dataset properties trace myDataSet firstName myDataSet lastName myDataSet next Design time example Creating fields for a DataSet component at design time is another way to expose the properties of a data object After the fields are defined you visually...

Page 426: ...field name lastName data type String field name usCitizen data type Boolean and field name age data type Integer 6 Drag a DataGrid component onto the Stage and name it myGrid 7 Select the DataGrid component and click the Bindings tab of the Component inspector 8 Click the Add Binding button to add a new binding Select dataProvider Array 9 Click Bound To select the DataSet component and select its ...

Page 427: ...taSet component The DataSet component generates a DeltaPacket an object that contains a list of changes made to the data at runtime The resolver component then converts the DeltaPacket to the appropriate format update packet When an update is sent to the server the server should respond with a results packet containing errors or updated field values from the operations that were performed The reso...

Page 428: ...andle updates for example in your own ASP page Java servlet or ColdFusion component For more information see the XUpdate specification at http xmldb org sourceforge net The XUpdateResolver component works only in applications published for Flash Player 7 For a common workflow and information about the methods events and properties of the XUpdateResolver component see XUpdateResolver component Flas...

Page 429: ...year 1974 town Leizig town country Germany country xupdate element xupdate insert after xupdate modifications When you use the XUpdateResolver component with a DataSet you must set the correct encoder on the Schema tab the DataSetDeltaToXUpdateDelta encoder This encoder is responsible for creating XPath statements that uniquely identify nodes within an XML file based on the information contained w...

Page 430: ...and deletes performed on the DataSet component You can view or bind the contents of the update packet using the updatePacket property of the RDBMSResolver component The RDBMSResolver component works only with Flash Player 7 or later For a typical workflow and information on the methods properties and events of the RDBMSResolver class see Using the RDBMSResolver component Flash Professional only an...

Page 431: ... a component property to a schema on page 398 Advanced topics in data integration This section discusses advanced topics such as refinements you make to schema settings and information for developers who need to write server side code to interact with Flash data applications Schema item settings This section contains details about schema item settings and how you edit them To help you determine wh...

Page 432: ... user input is bound to the params property of a connector component such as the XMLConnector component or WebServiceConnector component Another common example is when UI components are bound to data fields of the DataSet component This is how validation works After any binding is executed the new data is checked according to the validation rules of the destination field s data type A component ev...

Page 433: ...g Options dialog box which appears when you select this item These settings vary according to formatter For example the Boolean formatter has settings for the text that represents the true and false values For a complete list of formatters see Schema formatters on page 440 Kind and Encoder settings The Kind and Encoder settings are used to activate certain special features Kind The Kind setting fo...

Page 434: ... is convenient for calculating and displaying values based on calculations or concatenations performed other fields located in a record for instance you can create a calculated field that combines the first and last name fields together to display the full name to a user To set up a calculated field for the DataSet component 1 Select the DataSet component and click the Schema tab in the Component ...

Page 435: ...true or false value To make the billable attribute display a true or false value 1 Select the XMLConnector component click the Schema tab and select the billable schema field 2 In the bottom pane of the Schema tab set the data type property to Boolean 3 Set the encoder property to Boolean 4 Select Encoder Options and enter on for strings that represent true and enter off for strings that represent...

Page 436: ...h MX Professional 2004 and Flash Professional 8 None The default kind This kind is identical to the Data kind Data The schema item is a data structure and the data field is stored within the data structure as specified by the field s schema location This is the normal case The data structure can be in either ActionScript or XML form Calculated This kind is used with the DataSet component You can u...

Page 437: ...oded decoded at runtime Sometimes you might want a component property to have a different data type that what is actually stored inside the component For example an XMLConnector component results property is stored as an XML document which contains only strings You might want a certain field in the results to appear as a Boolean value instead To do this you set the field s data type to Boolean whi...

Page 438: ...coder extracts information from a DeltaPacket and generates XPath statements that are passed to the XUpdateResolver component to generate XUpdate statements It gets the information that is needs to generate the XPath statements from two places The rowNodeKey property which you must specify with the Encoder Options property defined in the third bullet below Within the schema that was used for the X...

Page 439: ...t substitutes the value from the id field of the data set to generate the correct XPath for the specified record In the next example the contacts node with a category attribute of Management represents the record s within the XML file and the employeeId subnode contains the value that makes the record unique datapacket company id 5 name ABC tech contacts category Mgmt contact empId 555 employeeId ...

Page 440: ...g This formatter converts a data object to a string You define the output format using a string template The template is arbitrary text that can refer to the data fields in one of the following ways field name field name field name using dots to drill down into the data structure which represents the entire object This can be used for example when the original object is a string in which case is s...

Page 441: ...al array and adds a label property to each object using the values you define The following template would achieve this this would be on a binding between your array and the List component s DataProvider property label My name is firstName lastName firstName firstName lastName lastName This syntax assumes that the object has two properties called firstName and lastName The label property will be a...

Page 442: ...all this ValidationError some informative message The custom class must be in the classpath and formatted as shown in the following example class myCustomType extends mx databinding CustomValidator function validate value some code here DataProvider No validation options Date No validation options DeltaPacket No validation options Integer A validation option can be set up to define the minimum and...

Page 443: ...he default values for the new data type If you select to completely reload the schema for a component property you will lose all the edits that had previously been made within the Schema Attributes pane When you build an application using data components and or data binding you need to apply schema item settings to some but not necessarily all fields of the components in your application The follo...

Page 444: ...ield Name Data Type You must set these for every data set field that you define Validation Options Read Only Required If validation is desired Formatter Formatter Options For fields that need formatting for display as text Default Value For fields whose value is sometimes undefined or to specify the initial value for newly created data set records UI components UI components typically don t need a...

Page 445: ...g the values for each property from the XML data and assign these values to the created item The Name and URL fields will have values Provide this item to the DataSet component The ID field does not exist on the item and the DataSet component has a blank entry for each item assigned The solution is to create a new schema field under the object within the Bird array The new schema field is named id...

Page 446: ... selection by name A B node selection of all child nodes of A B by wildcard C node selection of all C nodes that have exactly two ancestors Predicate syntax to further specify nodes to be selected B C child node syntax selects all B nodes that have a C node as a child B id attribute existence syntax selects all B nodes that have an attribute named id B id A1 attribute value syntax selects all B no...

Page 447: ...refresh the binding with ActionScript code For more information see ComponentMixins class Flash Professional only in the Components Language Reference in particular see the ComponentMixins refreshDestinations and ComponentMixins refreshFromSources methods In general for UI components the change or click events are the default events used to trigger data bindings such as TextInput change Button cli...

Page 448: ...t holds the ID from the operation node that was sent out msg optional An attribute containing a message string that describes the problem that occurred when attempting the operation field 0 1 or more child nodes that give field level specific information Each field node at a minimum should have a name attribute which contains the field name and a msg attribute which gives the field level message I...

Page 449: ...ete id 11295627477 field name id type numeric oldValue 10 key true delete insert id 12345678901 field name id type numeric newValue 20 key true field name firstName type string newValue Davey key false field name lastName type string newValue Jones key false insert update id 98765432101 field name id type numeric oldValue 30 key true field name firstName type string oldValue Peter newValue Mickey ...

Page 450: ...rmined If a field is defined as a key field using the RDBMSResolver component s fieldInfo parameter it will always appear in the update packet with key true Otherwise the field s key attribute in the update packet will be set according to the following table About receiving results from an external data source This section describes requirements that your server code must fulfill After the server ...

Page 451: ...lue Mickey field name lastName oldValue Tork newValue Dolenz update results_packet The results packet contains four types of nodes Operation nodes contain the result of operations from the update packet Each operation node should have the following attributes child nodes The op attribute describes the type of operation that was attempted Must be insert delete or update The id attribute holds the I...

Page 452: ...st the fields that are necessary to uniquely identify the record that was deleted Each field node must have a name attribute an oldValue attribute and a key attribute whose value is set to true Insert nodes contain information about records that have been added since the client was updated Insert nodes should have field child nodes that describe the field values that were set when the record was a...

Page 453: ... are made on the objects If methods are called on an anonymous object nothing happens because the methods don t exist However the DataSet component tracks them in the DeltaPacket which guarantees that they will be sent to the external data source where they can be called if appropriate In an enterprise solution you could create a client side ActionScript transfer object that mirrors a server side ...

Page 454: ...454 Data Integration Flash Professional Only ...

Page 455: ...figuring publish settings for Flash Player detection on page 468 Flash Player 6 and later supports Unicode text encoding With Unicode support users can view multilanguage text regardless of the language used by the operating system running the player For more information see Chapter 15 Creating Multilanguage Text on page 363 You can also publish the FLA file in alternative file formats GIF JPEG PN...

Page 456: ...ewing the publishing format and settings 498 Using Flash Player 498 About configuring a web server for Flash 499 Playing your Flash SWF files The Macromedia Flash SWF file format is for deploying Flash content You can play Flash content in the following ways In Internet browsers such as Firefox and Internet Explorer that are equipped with Flash Player 8 With the Flash Xtra in Director and Authorwa...

Page 457: ...g for sharing data between Flash documents Flash Player 7 and later enforces a stricter security model than earlier versions of Flash Player There were two primary changes in the security model between Flash Player 6 and Flash Player 7 Exact domain matching Flash Player 6 lets SWF files from similar domains for example www macromedia com and store macromedia com communicate freely with each other ...

Page 458: ...perly To test server configuration see TechNote 4151 on the Macromedia Flash Support Center at www macromedia com go tn_4151 If your server is not properly configured follow the procedure below to configure it Configuring a server establishes the appropriate Multipart Internet Mail Extension MIME types so that the server can identify files with the swf extension as Shockwave Flash files A browser ...

Page 459: ...sh profile so that the established publish settings are always available Depending on the options you specify in the Publish Settings dialog box the Publish command creates the following files The Flash SWF file Alternate images in a variety of formats that appear automatically when Flash Player is not available GIF JPEG PNG and QuickTime The supporting HTML document s required to show SWF content...

Page 460: ...he same location as the FLA file To change where files are published click the folder beside the filename and browse to a different location in which to publish the file 5 To create a stand alone projector file select Windows Projector or Macintosh Projector 6 Click the tab for the format options you want to change Specify publish settings for each format as described in the following sections 7 W...

Page 461: ...Flash Player detection on page 468 3 Select a load order to specify how Flash loads a SWF file s layers for showing the first frame of your SWF file Bottom Up or Top Down This option controls which parts of the SWF file Flash draws first over a slow network or modem connection 4 In the ActionScript Version pop up menu select either ActionScript 1 0 or 2 0 to reflect the version in your document If...

Page 462: ...you can enter a password in the Password text box If you add a password others must enter the password before they can debug or import the SWF file To remove the password clear the Password text box For more information on the Debugger see Chapter 2 Writing and Editing ActionScript 2 0 in Learning ActionScript 2 0 in Flash 7 To control bitmap compression adjust the JPEG Quality slider or enter a v...

Page 463: ...e network but not on the local system For more information see About local and network playback security on page 458 Setting the classpath To use an ActionScript class that you ve defined Flash must locate the external ActionScript 2 0 files that contain the class definition The list of folders in which Flash searches for class definitions is called the classpath Classpaths exist at the global app...

Page 464: ... activates the SWF file and specifies browser settings This document is generated automatically by the Publish command from HTML parameters in a template document The template document can be any text file that contains the appropriate template variables including a plain HTML file one that includes code for special interpreters such as ColdFusion or Active Server Pages ASP or a template included ...

Page 465: ...attributes in the object and embed tags Match Movie the default uses the size of the SWF file Pixels enters the number of pixels for the width and height in the Width and Height field Percent specifies the percentage of the browser window that the SWF file will occupy 6 Select Playback options to control the SWF file s playback and features as described in the following list Paused at Start pauses...

Page 466: ...r can handle it anti aliasing is automatically turned on Auto High emphasizes playback speed and appearance equally at first but sacrifices appearance for playback speed if necessary Playback begins with anti aliasing turned on If the actual frame rate drops below the specified frame rate anti aliasing is turned off to improve playback speed Use this setting to emulate the View Antialias setting i...

Page 467: ...ult Show All shows the entire document in the specified area without distortion while maintaining the original aspect ratio of the SWF files Borders can appear on two sides of the application No Border scales the document to fill the specified area and keeps the SWF file s original aspect ratio without distortion cropping the SWF file if needed Exact Fit displays the entire document in the specifi...

Page 468: ...is is because the JavaScript in those templates conflicts with the JavaScript used to detect the Flash Player To detect for the presence of Flash Player before allowing a browser to view SWF files that use the templates listed below you must create a separate HTML page with its own SWF file to detect Flash Player before redirecting browsers to the HTML page containing the Flash content The templat...

Page 469: ...sh Player detection code If an end user does not have the version of Flash you ve specified to view the SWF an HTML page with a link from which to download the latest version of Flash Player is displayed For more information of specifying publish settings for your Flash content see Specifying publish settings that create HTML documents with embedded Flash content on page 464 Specifying publish set...

Page 470: ...els for the exported bitmap image or select Match Movie to make the GIF the same size as the Flash SWF file and maintain the aspect ratio of your original image 5 Select a Playback option to determine whether Flash creates a still Static image or an animated GIF Animation If you select Animation select Loop Continuously or enter the number of repetitions 6 Select one of the following options to sp...

Page 471: ...lower value results in greater transparency A value of 128 corresponds to 50 transparency 8 Select a Dither option to specify how pixels of available colors are combined to simulate colors not available in the current palette Dithering can improve color quality but it increases the file size Select from the following options None turns off dithering and replaces colors not in the basic color table...

Page 472: ...ax Colors to set the number of colors used in the GIF image Selecting a smaller number of colors can produce a smaller file but can degrade the colors in the image 11 Click OK to save the settings with the current file Specifying publish settings for JPEG files The JPEG format lets you save an image as a highly compressed 24 bit bitmap Generally GIF format is better for exporting line art and JPEG...

Page 473: ...file as a PNG file unless you mark a different keyframe for export by entering the frame label Static To publish a PNG file with your Flash SWF file 1 Do one of the following to open the Publish Settings dialog box Select File Publish Settings In the Property inspector for the document which is available when no object is selected click the Settings button 2 On the Formats tab select the PNG Image...

Page 474: ... on a colored background and it increases the PNG file size Export an image without smoothing if a halo appears or if you re placing a PNG transparency on a multicolored background Dither Solids applies dithering to solid colors and gradients For more information see Dither options in step 6 Remove Gradients which is turned off by default converts all gradient fills in the application to solid col...

Page 475: ...tte To use this option you should know how to create and use custom palettes To select a custom palette click the Ellipsis button to the right of the Palette box at the bottom of the dialog box and select a palette file Flash supports palettes saved in the ACT format exported by Macromedia Fireworks and other leading graphics applications for more information see Importing and exporting color pale...

Page 476: ...ontent that you export to the QuickTime format should contain only those features supported by Flash Player 4 Future releases of the QuickTime Player might support additional Flash file formats If you try to export Flash Player 6 or 7 content to the QuickTime format an error message will appear indicating that the installed version of QuickTime does not support that version of Flash Player To reso...

Page 477: ...plays in the stacking order of the QuickTime video Top places the Flash track always on top of other tracks in the QuickTime video Bottom places the Flash track always behind other tracks Auto places the Flash track in front of other tracks if Flash objects are in front of video objects in the Flash application and behind all other tracks if Flash objects are not in front 7 Select Streaming Sound ...

Page 478: ...blish settings configuration You can then export the publish profile to other documents or for others to use them Conversely you can import publish profiles to use in your document Publish profiles offer many advantages including the following You can create profiles to publish in several media formats You can create a publish profile for in house use that differs from the way you d publish the fi...

Page 479: ...ublish profile and you want to save the modifications you can create a duplicate profile To duplicate a publish profile 1 From the Current Profile pop up menu in the Publish Settings dialog box File Publish Settings select the publish profile that you want to copy 2 Click the Duplicate Profile button 3 In the Duplicate Profile dialog box enter the profile name in the Duplicate Name text box and cl...

Page 480: ...e or browse to a new location and click Save Importing a publish profile Other users can create and export publish profiles which you can import and select as a publish settings option To import a publish profile 1 In the Publish Settings dialog box File Publish Settings click Import Export Profile and select Import 2 In the Import Profile dialog box browse to the publish profile XML file and clic...

Page 481: ... custom templates using any HTML editor Creating a template is the same as creating a standard HTML page except that you replace specific values pertaining to a Flash SWF file with variables that begin with a dollar sign Flash HTML templates have the following special characteristics A one line title that appears on the Template pop up menu in the HTML tab of the Publish Settings dialog box A long...

Page 482: ...a Flash 8 language Configuration HTML The boot drive is the drive from which Windows 2000 or Windows XP boots usually C The user is the name of the person logged in to the Windows 2000 or Windows XP operating system The language is set to an abbreviated language name For example in the US language is set to en for English Windows 98 boot drive Program Files Macromedia Flash 8 language First Run HT...

Page 483: ...hing Flash documents on page 459 Using HTML template variables The following table lists the template variables that Flash recognizes For a definition of all the tags with which these variables work see Editing Flash HTML settings on page 488 Attribute parameter Template variable Template title TT Template description start DS Template description finish DF Flash SWF file title T1 Flash SWF file t...

Page 484: ... Devicefont DE Bgcolor BG Movie text area to write movie text MT Movie URL location of SWF file URL MU Image width unspecified image type IW Image height unspecified image type IH Image filename unspecified image type IS Image map name IU Image map tag location IM QuickTime width QW QuickTime height QH QuickTime filename QN GIF width GW GIF height GH GIF filename GN JPEG width JW JPEG height JH JP...

Page 485: ... label the frame to appear as Static For JPEG during the publish operation place the playhead on the frame to be used for display 3 In an HTML editor open the HTML template you ll modify Flash stores HTML templates in the following location boot drive Program Files Macromedia Flash 8 language First Run HTML 4 Save your template 5 Select File Publish Settings click the Format tab and select a forma...

Page 486: ...ful shorthand elements Each variable causes Flash to insert into a template any nondefault values for some of the most common Flash object and embed parameters including PLAY PL QUALITY QU SCALE SC SALIGN SA WMODE WM DEVICEFONT DE and BGCOLOR BG For an example of these variables see the sample template in the following section Embedding search metadata The TL SWF file title and DC description meta...

Page 487: ... w3 org 1999 xhtml xml lang en lang en head CS title TI title head body bgcolor BG url s used in the movie MU text used in the movie MT object classid clsid d27cdb6e ae6d 11cf 96b8 444553540000 codebase http fpdownload macromedia com pub shockwave cabs flash swflash cab version 7 0 0 0 width WI height HE id TI align HA param name allowScriptAccess value sameDomain PO embed PEwidth WI height HE nam...

Page 488: ...parameters For object four settings height width classid and codebase are attributes that appear within the object tag all others are parameters that appear in separate named param tags as shown in the following example object classid clsid d27cdb6e ae6d 11cf 96b8 444553540000 width 100 height 100 codebase http fpdownload macromedia com pub shockwave cabs flash swflash cab version 7 0 0 0 param na...

Page 489: ...ist as you write custom HTML to show Flash content Unless noted all items apply to both the object and embed tags Optional entries are noted Parameters are used with the object tag and are recognized by Internet Explorer but the embed tag is recognized by Netscape Attributes are used with both the object and embed tags When you customize a template you can substitute a template variable identified...

Page 490: ...stem src attribute Value movieName swf Template variable MO Description Specifies the name of the SWF file to be loaded Applies to the embed tag only movie parameter Value movieName swf Template variable MO Description Specifies the name of the SWF file to be loaded Applies to the object tag only classid attribute Value clsid d27cdb6e ae6d 11cf 96b8 444553540000 Description Identifies the ActiveX ...

Page 491: ...ttribute Value http fpdownload macromedia com pub shockwave cabs flash swflash cab version 7 0 0 0 Description Identifies the location of the Flash Player ActiveX control so that the browser can automatically download it if it is not already installed The value must be entered exactly as shown Applies to the object tag only N OT E Because Flash applications are scalable quality doesn t degrade at ...

Page 492: ... unrelated to fscommand actions you can prevent Java from starting by setting SWLIVECONNECT to false You can also force Java to start when you are not using JavaScript with Flash by explicitly setting the SWLIVECONNECT attribute to true Starting Java substantially increases the time it takes to start a SWF file set this tag to true only when necessary Applies to the embed tag only Use the fscomman...

Page 493: ...earance whenever possible Playback begins with anti aliasing turned off If Flash Player detects that the processor can handle it anti aliasing is turned on Autohigh emphasizes playback speed and appearance equally at first but sacrifices appearance for playback speed if necessary Playback begins with anti aliasing turned on If the frame rate drops below the specified frame rate anti aliasing is tu...

Page 494: ...browser window when width and height values are percentages Showall Default makes the entire Flash content visible in the specified area without distortion while maintaining the original aspect ratio of the application Borders can appear on two sides of the application Noborder scales the Flash content to fill the specified area without distortion but possibly with some cropping while maintaining ...

Page 495: ... conditions see scale attribute parameter on page 494 L R T and B align the application along the left right top or bottom edge respectively of the browser window and crop the remaining three sides as needed TL and TR align the application to the top left and top right corner respectively of the browser window and crop the bottom and remaining right or left side as needed BL and BR align the appli...

Page 496: ... Explorer 4 0 This attribute parameter works only in Windows with the Flash Player ActiveX control Window plays the application in its own rectangular window on a web page Window indicates that the Flash application has no interaction with HTML layers and is always the topmost item Opaque makes the application hide everything behind it on the page Transparent makes the background of the HTML page ...

Page 497: ...in SeamlessTabbing parameter Value true false Description Optional Lets you set the ActiveX control to perform seamless tabbing so that the user can tab out of a Flash application This parameter works only in Windows with the Flash Player ActiveX control version 7 and higher true or omitted sets the ActiveX control will perform seamless tabbing after users tab through the Flash application the nex...

Page 498: ...ile remains in this location until you overwrite or delete it Using Flash Player Flash Player plays Flash content in the same way as it appears in a web browser or an ActiveX host application The player is installed with Flash application When you double click Flash content the operating system starts Flash Player which then plays the SWF file You can use the player to make Flash content viewable ...

Page 499: ...er can show error messages or a blank window with a puzzle piece icon If your server is not properly configured you or your server s administrator must add the Flash SWF file MIME types to the server s configuration files and associate the following MIME types with the SWF file extensions MIME type application x shockwave flash has the swf file extension MIME type application futuresplash has the ...

Page 500: ...500 Publishing ...

Page 501: ...asily Dreamweaver generates all the needed HTML code You can start Flash from within Dreamweaver to update the Flash content See Updating Flash content for Dreamweaver on page 510 This chapter contains the following sections Exporting Flash content and images 501 About export file formats 502 Updating Flash content for Dreamweaver 510 Exporting Flash content and images To prepare Flash content for...

Page 502: ...nger edit them in vector based drawing programs To export a Flash document or image 1 Open the Flash document you want to export or if you are exporting an image from the document select the frame or image in the current document that you want to export 2 Select File Export Movie or File Export Image 3 Enter a name for the output file 4 Select the file format from the Format pop up menu 5 Click Sa...

Page 503: ...command Versions of the Adobe Illustrator format before 5 do not support gradient fills and only version 6 supports bitmaps File type Extension Windows Macintosh Adobe Illustrator on page 503 ai Animated GIF GIF Sequence and GIF Image on page 504 gif Bitmap BMP on page 504 bmp DXF Sequence and AutoCAD DXF Image on page 505 dxf Enhanced Metafile Windows on page 505 emf Encapsulated PostScript EPS 3...

Page 504: ...color or Standard Color the standard 216 color browser safe palette You can also select to interlace smooth make transparent or dither solid colors For information on these options see Configuring publish settings for Flash Player detection on page 468 Animation is available for the Animated GIF export format only and lets you enter the number of repetitions where 0 repeats endlessly Bitmap BMP Th...

Page 505: ...sh drawings better than the older Windows Metafile format However some applications do not yet support this graphics format This format has no definable export options Encapsulated PostScript EPS 3 0 with Preview You can export the current frame as an EPS 3 0 file for placement in another application such as a page layout application An EPS file can be printed by a PostScript printer As an option ...

Page 506: ...ation where it will be saved and click Save 5 In the Embedded Video Properties dialog box click OK to close the dialog box JPEG Sequence and JPEG Image The JPEG export options match the JPEG Publish Settings options with one exception the Match Screen export option makes the exported image match the size of the Flash content as it appears on your screen The Match Movie publishing option makes the ...

Page 507: ...ns sets the size of the exported bitmap image to the number of pixels you enter in the Width and Height fields Resolution lets you enter a resolution in dpi To use the screen resolution and maintain the aspect ratio of your original image select Match Screen Colors is the same as the Bit Depth option in the PNG Publish Settings tab and sets the number of bits per pixel to use in creating the image...

Page 508: ...t in a video editing application The Export QuickTime Video dialog box contains the following options Dimensions specifies a width and height in pixels for the frames of a QuickTime movie By default you can specify only the width or the height and the other dimension is automatically set to maintain the aspect ratio of your original document To set both the width and the height deselect Maintain A...

Page 509: ...iginal document Deselect Maintain Aspect Ratio to set both the width and the height Video Format selects a color depth Some applications do not yet support the Windows 32 bit image format If you have problems using this format use the older 24 bit format Compress Video displays a dialog box for selecting standard AVI compression options Smooth applies anti aliasing to the exported AVI movie Anti a...

Page 510: ... select Edit with Flash from the context menu In the Site panel right click Windows or Control click Macintosh the Flash content in Design view and select Open with Flash from the context menu The Flash application is started on your system 3 If the Flash file FLA for the exported file does not open a file locator dialog box appears Navigate to the FLA file in the Open File dialog box and click Op...

Page 511: ...nsider Depending on your audience s needs additional requirements might arise Visually impaired users For visually impaired users including those with color blindness remember the following design recommendations Use the Accessibility panel or ActionScript to provide a description of your document and nontext elements for use with a screen reader See Using Flash to enter accessibility information ...

Page 512: ...luttered design that is easily navigable This chapter contains the following sections Worldwide accessibility standards 512 Macromedia Flash Accessibility web page 513 Understanding screen reader technology 513 Using Flash to enter accessibility information for screen readers 516 Viewing and creating tab order and reading order 525 About animation and accessibility for the visually impaired 528 Us...

Page 513: ...te and read the web content aloud Visually impaired users often rely on this technology You can create Flash content designed for use with screen readers only with Windows platforms Viewers of your Flash content must have Flash Player 6 or later and Internet Explorer on Windows 98 or later JAWS from Freedom Scientific is one example of screen reader software You can access the JAWS page of the Fre...

Page 514: ...tion on Microsoft Accessibility Technology visit the Microsoft Accessibility website at www microsoft com enable default aspx The Windows ActiveX Internet Explorer plug in version of Flash Player 6 supports MSAA but the Windows Netscape and Windows stand alone players do not Flash Player makes information about the following types of accessibility objects available to screen readers using MSAA To ...

Page 515: ...other accessible objects the clip itself is ignored and the objects inside it are made available to screen readers Basic accessibility support in Flash Player Flash Player provides some basic accessibility support for all Flash documents whether or not they are designed using the accessibility features found in the Flash authoring tool This generic support for documents that do not use any accessi...

Page 516: ...e not exposed to screen readers at all The Flash Accessibility panel The Flash Accessibility panel lets you provide accessibility information to screen readers The Accessibility panel is a self contained property inspector that lets you set accessibility options for individual Flash objects or entire Flash applications If you select an object on the Stage you can make that object accessible and th...

Page 517: ...formation to the screen reader This option is for movie clips only and is selected by default Disabling this option for a movie clip causes that movie clip to appear as a simple clip in the accessible object tree even if the clip contains text buttons and other objects All objects within the movie clip are then hidden from the object tree Like the Make Object Accessible option this option is usefu...

Page 518: ...h applications You can use the Accessibility panel to assign names to buttons and input text fields so that they are identified appropriately by the screen reader There are two ways of doing this Use the auto label feature to assign text adjacent or within the object as a label Enter a specific label in the Accessibility panel name field Using automatic labeling Flash automatically applies the nam...

Page 519: ...an t detect you can specify a name for the button or text field You can also specify a name if the text label is near a button or text field but you don t want that text to be used as that object s name For example in the following figure the text that describes the button appears outside and to the right of the button In this location Flash Player does not detect the text and it is not read by th...

Page 520: ...escription text box To define accessibility for a selected object in a Flash application 1 Select the object on the Stage and do one of the following Select Window Properties if the inspector is not visible In the Property inspector click the Accessibility button Select Window Other Panels Accessibility 2 In the Accessibility panel do one of the following Select Make Object Accessible the default ...

Page 521: ...vie clip or Flash application to screen readers Turning off automatic labeling for an object and specifying a name You can specify a name for an individual object if automatic labeling does not provide the correct information To turn off an automatic label for an individual object and specify a name for it 1 On the Stage select the button or input text field for which you want to control labeling ...

Page 522: ...wing If the object is a movie clip button text field or another object deselect Make Object Accessible If the object is the child of a movie clip deselect Make Child Objects Accessible Creating a keyboard shortcut You can create a keyboard shortcut for an object such as a button so users can quickly navigate to it without listening to the contents of an entire page For example you can create a key...

Page 523: ...rd shortcuts See Testing accessible content on page 533 To indicate the name of a keyboard shortcut for the screen reader 1 On the Stage select the button or input text field for which you want to create a keyboard shortcut 2 Do one of the following Select Window Properties if the inspector is not visible In the Property inspector click the Accessibility button Select Window Other Panels Accessibi...

Page 524: ...Making an entire Flash application accessible After a Flash document is complete and ready to be published make the entire Flash application accessible To define accessibility for an entire Flash application 1 When the Flash document is complete and ready to be published or exported deselect all elements in the document and do one of the following Select Window Properties if the inspector is not v...

Page 525: ...t medium for most screen reader users Consider how any sound in your document will interact with the text spoken aloud by screen readers It might be difficult for screen reader users to hear what their screen readers are saying if your Flash application contains loud sounds Viewing and creating tab order and reading order There are two aspects to tab indexing order the tab order in which a user na...

Page 526: ...r example dynamic text must have tab indexes even though a user cannot tab to dynamic text If you do not produce a tab index for every accessible object in a given frame Flash Player ignores all tab indexes for that frame whenever a screen reader is present and uses the default tab ordering instead See Using ActionScript to create a tab order for accessible objects on page 532 Creating a tab order...

Page 527: ...b Index text box enter a positive integer up to 65535 that reflects the order in which the selected object should receive focus To view a tab order Select View Show Tab Order Tab index numbers for individual objects appear in the upper left corner of the object C A UT I ON If two or more objects have the same tab index in any given frame Flash follows the order in which the objects were placed on ...

Page 528: ...Player can t determine the actual text content of that text Also be aware of information carrying graphics such as icons and gestural animations Screen readers can only provide accurate accessibility to such objects if you provide names and descriptions for these objects within your document or for the entire Flash application You can also add supplementary text into your document or shift importa...

Page 529: ...en readers see the Macromedia Flash Accessibility web page at www macromedia com go flash_accessibility For general information about components see Chapter 1 About Components in Using Components For each accessible component you enable the accessible portion of the component with the enableAccessibility command This command includes the accessibility object with the component as the document is c...

Page 530: ...thod causes Flash Player to re examine all accessibility properties update property descriptions for the screen reader and if necessary send events to the screen reader that indicate changes have occurred Property Type Equivalent selection in the Accessibility panel Applies to silent Boolean Make Movie Accessible Make Object Accessible inverse logic Entire documents Buttons Movie clips Dynamic tex...

Page 531: ... Reference For example you could use the Accessibility isActive method to decide whether to include unsolicited animation Unsolicited animation happens without the screen reader doing anything which can be confusing for screen readers The Accessibility isActive method provides asynchronous communication between the Flash content and Flash Player which means that a slight real time delay can occur ...

Page 532: ...ll objects assigned to a tab order except frames must have an instance name specified in the Instance Name text box of the Property inspector Even items that are not tab stops such as text need to be included in the tab order if they are to be read in that order Because static text cannot be assigned an instance name it cannot be included in the list of the tabIndex property values As a result a s...

Page 533: ...ccessibility whitepapers For more information on Hi Caption SE see the link on the Macromedia Accessibility Captioning page at www macromedia com macromedia accessibility tools caption html Testing accessible content When you test your accessible Flash applications follow these recommendations If you are designing your document to work with screen readers download several screen readers and test y...

Page 534: ...534 Creating Accessible Content ...

Page 535: ...advantages including the following Users can print all frames or certain frames that you ve labeled as printable from Flash Player Additionally you can set the print area of a frame You can specify that content print as vector graphics to take advantage of higher resolution or as bitmaps to preserve transparency and color effects The ActionScript PrintJob object improves upon the print and printAs...

Page 536: ... and text fields Levels in a SWF file are not composited on print output The Flash Player printer driver uses the HTML settings for dimension scale and alignment in the Publish Settings dialog box Use these settings to control the print layout The selected frames print as they appear in the movie clip symbol You can let users print a movie clip that is not visible in a browser by setting the movie...

Page 537: ...d your document can access your user s printer settings such as page height width and orientation and you can configure your document to dynamically format Flash content that is appropriate for the printer settings Building a print job To build a print job you use functions that complete the tasks in the order outlined in this section The sections that follow the procedure provide explanations of ...

Page 538: ...print job on page 543 The following example shows ActionScript that creates a print job for a button myButton onRelease function var my_pj new PrintJob var myResult my_pj start if myResult myResult my_pj addPage 0 xMin 0 xMax 400 yMin 0 yMax 400 myResult my_pj addPage myMovieClip xMin 0 xMax 400 yMin 400 yMax 800 printAsBitmap true 1 myResult my_pj addPage 1 null printAsBitmap false 2 myResult my_...

Page 539: ... sends the print job to the printer Flash Player effectively calls PrintJob send causing any pages that are added using PrintJob addPage to be printed and spooling to stop When a new print job is constructed the PrintJob properties are initialized to 0 When PrintJob start is called after the user selects the print option in the operating system print dialog box Flash Player retrieves the print set...

Page 540: ...eters without affecting previously set parameters For example you can specify that one page print as a bitmap image and another page print as a vector graphic You can add as many new pages to your print job as the print job requires One call to add a page equals one printed page Specifying a target The target parameter can be either a number that represents a level such as 0 for the _root document...

Page 541: ...lts to the Stage area of the root document About scaling A print job using the PrintJob class prints Flash content by default without scaling it For example an object that is 144 pixels wide on screen will print as 144 points or 2 inches wide One point equals one pixel In the authoring tool 72 pixels equals one inch on paper 72 points equals one inch To understand how Flash screen content maps to ...

Page 542: ...method method of the printjob function in the ActionScript 2 0 Language Reference Specifying printing as a vector image or bitmap graphic The options parameter lets you specify whether to print as a vector graphic or bitmap image When using this optional parameter use the following syntax printAsBitmap boolean The default value is false which represents a request for vector printing Remember the f...

Page 543: ...rint targeting Flash Player 6 and earlier versions back to Flash Player 4 0 25 Windows and 4 0 20 Macintosh you can use print and printAsBitmap functions and frame labels classic functionality that remains part of the authoring tool and does not use the PrintJob class To set up printing from Flash Player independent of the PrintJob class you can specify frames to print and set their print area For...

Page 544: ...sh Settings dialog box Use these settings to control the print layout The selected frames print as they appear in the movie clip symbol You can let users print a movie clip that is not visible in a browser by setting the movie clip s _visible property to false using the Actions panel Changing the property of a movie clip with the Set Property action tweening or any transformation tool does not aff...

Page 545: ...ameter as shown in the following example print myMovie bmax With the print function you can change the print area for each frame scaling objects to fit the print area for example to have objects of different sizes in each frame fill the printed page To change the bounding box per frame use the Frame parameter in the Print action parameters as shown in the following example print myMovie bframe Wit...

Page 546: ...er trigger in your document to activate printing is shown as follows print target Bounding box The target parameter specifies the location of the frames that print and the bounding box parameter specifies the print area You can add a print function to a button or other element in your document to let users print Flash content You assign the print function to a button frame or movie clip If you ass...

Page 547: ...s background make sure that the frame in which you placed the shape is designated to print For instructions see Specifying a frame to print on page 542 or Using the print function when not using the PrintJob object on page 546 To maintain a different background color for nonprinting frames repeat steps 2 and 3 Then place the shape on the lowest layer of the Timeline in all the frames that are not ...

Page 548: ...that you want to publish 2 Select File Publish Settings 3 Select the HTML tab and deselect Display Menu 4 Click OK For more information on publishing options see Publishing Flash documents on page 459 Printing from the Flash Player context menu You can use the Print command in the Flash Player context menu to print frames from any Flash SWF file The context menu s Print command cannot print transp...

Page 549: ...Player context menu 4 Select Print from the Flash Player context menu to display the Print dialog box 5 In Windows select the print range to select which frames to print Select All to print all frames if no frames are labeled Select Pages and enter a range to print the labeled frames in that range Select Selection to print the current frame 6 On the Macintosh in the Print dialog box select the pag...

Page 550: ...plates For more information see Publishing Flash documents on page 459 Users must have Flash Player 4 0 25 Windows or 4 0 20 Macintosh or later to take advantage of any print functionality you have added and to print the designated frames in Flash You can set up a detection scheme to check for the proper Flash Player version NO T E When you use the PrintJob class users must have Flash Player 7 or ...

Page 551: ...sh learning interaction can send tracking information to a server side learning management system LMS that complies with the Aviation Industry CBT Committee AICC protocol or Shareable Content Object Reference Model SCORM standards Additionally the quiz templates track cumulative results from a sequence of interactions and can pass them along to the LMS using an enhanced data tracking functionality...

Page 552: ...er interacts with the application to provide a response A typical response might be answering a question selecting from the answers True or False or clicking an area of the screen You can use the six learning interactions included with Flash to build interactive courseware True or False In this type of interaction the user responds to a question with the answers True or False Multiple Choice The u...

Page 553: ...hem to an AICC compatible LMS See Adding learning interactions to a quiz template on page 560 To initialize SCORM tracking you must use a quiz template Using the quiz templates Each of the three quiz templates that come with Flash has a different graphical look and feel but they are otherwise identical Each template contains the following elements A Welcome page One of each of the six learning int...

Page 554: ...emplates column select one of the quiz styles Setting the quiz parameters After you create a new file and select one of the quiz templates the next step is to set the quiz parameters These parameters control how the entire quiz is presented to users for example whether the questions are presented in a random or sequential order the number of questions to display and whether the Results page appear...

Page 555: ...ou set the parameters for the quiz 2 Do one of the following to open the Component inspector Select Window Component Inspector In the Property inspector click Launch Component Inspector N O TE These instructions do not appear in the SWF file NO T E If the text in the Component inspector is too small to be legible drag a corner of the panel to enlarge it You may need to undock the panel to enlarge ...

Page 556: ...ser This feature is especially helpful when used with the Randomize feature to create quizzes with unexpected questions in an unexpected order 5 Enter the URL to redirect the user When an AICC compliant LMS starts a quiz it includes parameters that the HTML code looks for when it executes the embed tag for the Flash application and the course loads properly If no parameters are specified the user ...

Page 557: ...iz template 1 Select the first frame in the Interactions layer and make any modifications you want to the text of the Welcome page Make sure you include text to indicate that the user must click the Next button to continue Do not add an interaction to this page 2 Select each of the learning interactions in the next six frames and do one of the following If you want to use the interaction follow th...

Page 558: ...o edit the individual objects To configure a Learning Interaction component 1 With the entire learning interaction selected select Modify Break Apart This breaks the interaction into individual objects that can be modified 2 Deselect all the items on the Stage Control Shift A 3 Select the Learning Interaction component N OT E Make sure that you break apart the interaction only once See Testing to ...

Page 559: ...rom the library or you are not using the quiz template make sure to uniquely name each interaction in your file 6 In the Question text box type the text you want the user to see This text can be a question and or instructions for the user 7 Configure the learning interaction For more information see the following sections Configuring a Drag and Drop interaction on page 567 Configuring a Fill in th...

Page 560: ...e you add learning interactions to the Interactions layer To add an interaction to the Timeline when using a quiz template 1 In the first layer of the Timeline select the frame that precedes the frame number in which you want to add the interaction For example if you want to add an interaction to Frame 8 select Frame 7 2 Shift click the same frame number on the other layers to also select those fr...

Page 561: ...ge or the settings in the Component inspector as desired To use an interaction from the library drag the desired interaction movie clip type from the Learning Interactions library Window Common Libraries Learning Interactions to the blank keyframe Break the interaction apart select the interaction and select Modify Break Apart and edit the assets and parameters Adding learning interactions to a do...

Page 562: ... True or False In addition there are folders called Assets Graphics and UIComponents These are used for customizing learning interactions See Changing buttons check boxes and radio buttons on page 565 3 Select the new keyframe you created and then drag one of the Learning Interaction movie clips from the Library panel to the Stage 4 Reposition the interaction by dragging it to where you want it to...

Page 563: ...ols in the following illustration become part of the document library If you re using a quiz template the learning interaction symbols are already included in your document library To manage library assets it is a good idea to create folders for each graphical interaction and place the folders within the Assets folder You can then keep the movie clips associated with the interaction within the new...

Page 564: ... object is selected the interaction is not broken apart If you can select a single text field or another element then the interaction has been broken apart and you can proceed with editing Changing the appearance of a learning interaction After you have added a learning interaction to the Stage and broken it apart you can place and size most assets the same as you would in any other Flash document...

Page 565: ...h as DragA of the movie clip in the appropriate Name text box The Component inspector should include only the unique instance names of the movie clips that you re using for the current interaction 6 Repeat steps 3 5 for additional graphical objects within the interaction Changing buttons check boxes and radio buttons The learning interactions use the Flash user interface UI Button CheckBox RadioBu...

Page 566: ...ton labels for a learning interaction on page 585 See also Chapter 5 Customizing Components in Using Components About using components within a learning interaction To use Flash UI components with a learning interaction you simply add the UI components to the interaction assets and name their instances You then need to register the instance names with the component associated with that interaction...

Page 567: ...ag and Drop interaction You can use as many as eight Drag objects and eight Target objects in each Drag and Drop interaction Each Drag object can snap to any target named in the Drag and Drop component for evaluation Drag objects can also share targets for example both Drag 1 and Drag 2 can match Target 8 You can also specify a target without matching a Drag object to it which lets you add incorre...

Page 568: ...r Target object on the Stage Use the Property inspector to give each instance the same instance name that you specified in the Component inspector Adding and removing Drag objects and Target objects You can change the default number of four objects and four targets by adding more objects and targets or by deleting existing objects and targets You can include from one to eight Drag objects and one ...

Page 569: ... a Fill in the Blank interaction The Fill in the Blank interaction uses a question text field a user entry text field a control button and a feedback text field To set up a Fill in the Blank interaction 1 If you are not using a quiz template place the learning interaction on the Stage If you are using a quiz template select the frame on the Interactions layer that contains the Fill in the Blank in...

Page 570: ...ll other responses are correct 4 Specify whether the matching responses are valid only if they match the case of the text you entered by selecting Case Sensitive or if they are valid regardless of the capitalization the user enters by deselecting Case Sensitive 5 Specify whether the matching response must be an exact match If you select Exact Match a correct response matches only if the user enter...

Page 571: ...2 Break the movie clip apart Modify Break Apart display the Component inspector and then type the interaction ID and the question See Configuring a Learning Interaction component on page 558 3 For each object select or deselect the Correct option to specify whether the object is considered a correct or incorrect response when the user clicks it You can have multiple correct selections 4 Select eac...

Page 572: ...it in the library 2 Select the Hot Object component on the Stage and then drag the symbol from the Library panel to the Stage 3 In the Property inspector name the instance See Naming and registering graphic distractors on page 579 4 Add the instance name to the Component inspector for the hot object The component does the rest of the work automatically at runtime To remove a hot object distractor ...

Page 573: ...he Hot Spot interaction Frame 5 if you have not added or removed keyframes 2 Break the movie clip apart Modify Break Apart display the Component inspector and then type the interaction ID and the question See Configuring a Learning Interaction component on page 558 3 For each hot spot select or deselect the Correct option to specify whether the object is considered a correct or incorrect response ...

Page 574: ...ts and you want to add a seventh choice create a movie clip of the seventh graphic and place it in the library 2 Select the Hot Spot component on the Stage and then drag the symbol from the Library panel to the Stage 3 In the Property inspector name the instance See Naming and registering graphic distractors on page 579 4 Add the instance name to the Component inspector for the hot spot The compon...

Page 575: ...g more distractors or deleting existing distractors To add a multiple choice distractor 1 Select the frame with the Multiple Choice learning interaction in the Timeline 2 Open the Flash UI Components folder in the Library panel Window Library and drag a CheckBox component to the Stage 3 In the Property inspector name the instance See Naming and registering graphic distractors on page 579 4 Add the...

Page 576: ...r False is the correct response for the interaction If you want you can change these responses to Correct or Incorrect by changing the text of the distractors For example you could type A Correct and B Incorrect in the Distractors text boxes True or False interaction distractors The True or False interaction includes a question text field two RadioButton components a control button and a feedback ...

Page 577: ... s important to register those names in the Component inspector for the learning interaction so that the scripts can control the assets About naming Learning Interaction component instances Every interaction has an interaction component associated with it to configure its unique parameters These components do not need to be named Naming UI components RadioButton CheckBox Button and TextInput When ...

Page 578: ...ame in the Instance Name text box 3 Register the name in the Component inspector see the next section Registering dynamic text fields and UI components After you enter the instance name for a dynamic text field or Button component in the Property inspector you need to register the instance in the Component inspector for the interaction To register dynamic text fields and Button components 1 Select...

Page 579: ...he Property inspector type a name in the Instance Name text box 4 Repeat steps 1 3 for each object on the Stage 5 Register the names see the following procedure To register a distractor instance name 1 Select the Learning Interaction component to the left of the Stage in the quiz template and open the Component inspector from the Property inspector if necessary 2 Enter the name in the Component in...

Page 580: ... Target1 Target8 Asset Description Object type Instance name Question text field Holds question text Dynamic text field Template_Question Feedback text field Holds feedback text Dynamic text field Template_Feedback User entry field User types answer into this text field Flash UI TextInput component Template_UserEntry Control button Submits user response and controls navigation Flash UI Button comp...

Page 581: ...bol HotSpot1 8 Asset Description Object type Instance name Question text field Holds question text Dynamic text field Template_Question Feedback text field Holds feedback text Dynamic text field Template_Feedback Control button Submits user response and controls navigation Flash UI Button component Template_ControlButton 3 8 check boxes Check box distractors Flash UI CheckBox component Checkbox1 8...

Page 582: ...s enter the number of tries that a user is given to provide a correct response For Initial Feedback enter the feedback that appears before the user has interacted with the quiz for example Click an object and drag it to the matching object For Correct Feedback enter the feedback that appears if the user s response is correct for example Yes that is correct For Incorrect Feedback enter the feedback...

Page 583: ...to an HTML page and select the HTML template in publish settings for either Flash with AICC Tracking or Flash with SCORM Tracking To support an AICC compliant LMS the HTML that embeds the SWF file needs to be part of a frameset See Preparing Flash learning interactions for web hosting on page 588 The tracking data captured and transmitted by Knowledge Track is based on an industry standard for cou...

Page 584: ...eraction The quiz templates use this parameter to calculate the score in the Results page The default value is 1 Weighting indicates the relative importance of a question You can enter any numeric value If all learning interactions have a weight of 1 they are all scored equally A weight of 2 counts twice as much as a weight of 1 and half as much as a weight of 4 For example you can give advanced q...

Page 585: ...its a response If Feedback is deselected and Knowledge Track is selected the Auto GoTo Next Frame feature can be enabled This feature submits a score after evaluation and immediately navigates to the next frame for the next interaction Setting control button labels for a learning interaction All six types of interactions use an instance of the same control buttons Check Answer Submit Next Question...

Page 586: ...he file is loaded It also sends a finish communication to the LMS when the file is unloaded if the finish command wasn t explicitly sent previously The files created using both the Flash learning interactions and the quiz templates can send tracking data to an AICC and SCORM compliant LMS Individual interactions do not send overall score and tracking data but they can send interaction or question ...

Page 587: ...ata to the LMS through the HTML JavaScript tracking files The tracking data is sent when the student answers a question or progresses to the next page SCORM communication overview When a student takes an SCORM compliant quiz the following events occur 1 The LMS is initialized 2 The student logs in to the LMS 3 The student starts a quiz built using a Flash quiz template 4 The content is embedded in...

Page 588: ... an AICC compliant file for web hosting 1 Open the document in Flash 2 Select File Publish Settings 3 In the Publish Settings dialog box that appears make sure that at least both Flash SWF and HTML files are selected in the Formats panel 4 Click the HTML tab at the top of the Publish Settings dialog box and select the Flash with AICC Tracking template from the Template pop up menu 5 Click the Publ...

Page 589: ...tem or create the AICC Course Descriptor Files that references the frameset htm file Preparing a SCORM compliant learning interaction for web hosting To send tracking data to a SCORM compliant LMS you must enable tracking for the quiz and publish the learning interaction using the Flash with SCORM Tracking template In addition you must place the files generated by Flash on your web server in the s...

Page 590: ...property names on page 591 When the Timeline moves to the second interaction that interaction s component creates an instance of LToolBox global class in index1 of the SessionArray When the Timeline moves to the third interaction that interaction s component creates an instance of LToolBox global class in index2 of the SessionArray It continues with index3 index4 and so on until all interactions a...

Page 591: ...fined property names The following table describes the predefined property names All the methods and properties of the LToolBox global class are available within each SessionArray index Property name Description interaction_id Unique interaction name interaction_type Type of interaction objective_id Objective identification number weighting Weighting value for this interaction instance some intera...

Page 592: ...scripts are built on the component level they are initialized on the same level as the interaction assets and submit data to the SessionArray on the interaction assets level To explore the scripts or add to them look in the library for the 1_GlobalClass folder to access the LGlobalClass movie clip that contains the LToolBoxglobalclass script Look in the 2_Components folders to access each Learning...

Page 593: ... 598 Using the screen presentation templates Flash Professional only on page 599 Using the mobile device templates on page 601 Using quiz templates on page 601 Using form application templates Flash Professional only on page 601 To create a new document using a template 1 Select File New 2 In the New Document dialog box click the Template tab 3 In the New from Template dialog box select a Presenta...

Page 594: ...ns in which their technologies are stable Examples are available at the IAB Rich Media testing site at www iab net standards guidelines asp In addition there might be additional requirements on size and file format of ads that vary by vendor and site Check with your vendor ISP or the IAB to learn about these requirements that can affect the ad s design More information on rich media The Macromedia...

Page 595: ...andle the selection of radio buttons is included within the Timeline of this screen To change the option labels or the number of options that users is presented you can add remove or edit the components on the Select form Setting the URLs to the video content Flash Professional only The media playback component progressively downloads FLV files without requiring them to be embedded in the SWF file...

Page 596: ...ard coded paths Setting cue points with the video templates Flash Professional only Cue points are also set as properties of the media display component in the Parameters tab in the Component Inspector You add new cue points to the list using the Add button above the Cue Points list Remove cue points with the Delete button Each cue point should be given a name and position If you give your cue poi...

Page 597: ...ayer of photos included in the example called Old Photos and click the trash can icon to delete it 2 Create a new layer by clicking the Insert Layer button and name this new layer My Photos Make sure that this new layer is the bottom layer 3 Select the first blank keyframe in the My Photos layer select File Import and locate your photo sequence 4 Select the first image in the series click Add and ...

Page 598: ...reate customize and publish your presentations Creating a slide presentation Creating a slide presentation is as easy as adding new keyframes Flash provides three slide layouts to get you started To create a slide presentation 1 Select File New 2 In the New Document dialog box click the Template tab 3 In the New from Template dialog box select a Presentation template 4 In the Slide layer add a key...

Page 599: ...elect something bright and eye catching to capture your audience s attention Using the screen presentation templates Flash Professional only The screen presentation templates included with Flash Professional 8 use screens to make it easy for you to create a professional looking slide presentation You can add new slides to the outline and place text graphics imported media and components on those s...

Page 600: ...g transitions to the screen presentation templates Flash Professional only After you ve customized the content of your presentation you can add animated transitions that help illustrate your points Use the Behaviors panel to add transitions to your presentations To add transitions to a screen presentation 1 Select the screen for which you d like to add a transition 2 If the Behaviors panel isn t v...

Page 601: ...r many mobile devices Use the device skins in the templates to preview your content as it will look on the device For more information on authoring Flash files for mobile devices see the Macromedia Mobile Devices site at www macromedia com devnet devices Using quiz templates You can use the quiz templates to create self scoring quizzes with several interaction types For information about using the...

Page 602: ...he Components panel If you select your own connector you can delete the web service component but you must edit the actions in Frame 1 of the Application form to replace wsc with the instance name of the connector you created This ensures that the Submit button triggers your service For more information about web service and other connectors see Chapter 1 About Components in Using Components Custo...

Page 603: ... showError function result res Handle result message for errors If error showError 2 You can replace the bodies of these functions with your own code to interpret the status and result messages and do one of the following actions Catch an error and show the error screen Go to the results screen to show the service s response To learn more about the result and status messages of a service call see ...

Page 604: ...r more information about data connectors see Chapter 1 About Components in Using Components 2 After altering the contents of a form make sure that the window component that will load the form is sized properly so your form s content won t appear clipped at runtime To add new windows and content 1 Create a new form in the Screen Outline pane and give it an instance name Make sure that its visible p...

Page 605: ...es or accepts parameters XML to UI uses a subset of the XML User Interface Language XUL along with some tags created for Flash These tags define a dialog box exclusively with XML The XML to UI rendering engine parses the XML and generates a modal dialog box Modal dialog boxes unlike modeless dialog boxes must be dismissed either accepted or cancelled before the application can continue operation W...

Page 606: ...ag for the entire dialog box grid Creates a container for tabular layout using rows and columns hbox Creates a container for items laid out horizontally row Creates one row in a tabular grid layout rows Creates a container tag for the row tags in a tabular grid layout separator Creates a separator bar that displays vertically in an hbox and horizontally in a vbox spacer Creates a transparent fill ...

Page 607: ...l to contain listitem tags listitem Creates an individual item in a list box control menulist Creates a pop up menu control that contains menupop and menuitem tags menupop Creates the pop up menu in a pop up menu control contains menuitem tags menuitem Creates an individual item in a pop up menu control popupslider Creates a pop up slider control this is not part of the XUL standard property Creat...

Page 608: ...ld tags Control tags Parent tag columns Description Layout tag creates one column in a tabular grid layout The column tag must be within a columns tag which must be within a grid tag Example See the example for grid columns Availability Flash MX 2004 Usage columns child tags columns Attributes None ...

Page 609: ...tags dialog Attributes id String represents a unique identification string that is used by the extensibility features to identify the dialog box and access the values it returns title String text that appears in the title bar of the dialog box buttons Accepts either or both of the strings accept and cancel which represent the OK and Cancel buttons respectively Child tags hbox grid vbox Description...

Page 610: ...s in hbox and vbox For an example that uses the dialog tag with the grid tag see the example in grid grid Availability Flash MX 2004 Usage grid child tags grid Attributes None Child tags columns rows Parent tag dialog Description Layout tag creates a container for tabular layout using rows and columns tags ...

Page 611: ...ialog id scale dialog title Scale Selection buttons accept cancel grid columns column column columns rows row align center label value Scale x control xScale textbox id xScale row row align center label value Scale y control yScale textbox id yScale row rows grid dialog hbox Availability Flash MX 2004 Usage hbox child tags hbox Attributes None Child tags hbox vbox Parent tag dialog hbox vbox ...

Page 612: ...h a textbox control and a drop down menu control dialog id GotoWebPage dialog title Go to URL buttons accept cancel vbox hbox label value URL control URL textbox literal true required true width 40 id URL hbox hbox label value Open in control targetWindow menulist literal true id targetWindow menupopup menuitem label _self menuitem label _parent menuitem label _blank menuitem label _top menupopup ...

Page 613: ...Flash MX 2004 Usage row child tags row Attributes None Child tags Control tags Parent tag rows Description Layout tag creates one row in a tabular grid layout The row tag must be within a rows tag which must be within a grid tag ...

Page 614: ...st dialog id scale dialog title Scale Selection buttons accept cancel grid columns column column columns rows row align center label value Scale x control xScale textbox id xScale row row align center label value Scale y control yScale textbox id yScale row rows grid dialog rows Availability Flash MX 2004 Usage rows child tags rows Attributes None Child tags row Parent tag grid ...

Page 615: ...dialog box works with a JavaScript API command see the example for menulist dialog id scale dialog title Scale Selection buttons accept cancel grid columns column column columns rows row align center label value Scale x control xScale textbox id xScale row row align center label value Scale y control yScale textbox id yScale row rows grid dialog separator Availability Flash MX 2004 Usage separator...

Page 616: ...rent dialog box which comes with Flash MX 2004 is defined in the file CuePointNamedFrame xml dialog id NamedFrameCuePointDialog title Labeled Frame CuePoint Navigation buttons accept cancel vbox hbox label value Select clip with labeled frames control target required true targetlist id target class movieclip hbox hbox checkbox id stop label gotoAndStop vs gotoAndPlay checked false hbox vbox dialog...

Page 617: ...on buttons accept cancel vbox label value Select clip with labeled frames control target required true targetlist id target class movieclip separator checkbox id stop label gotoAndStop vs gotoAndPlay checked false vbox dialog The modified tags produce the following dialog box spacer Availability Flash MX 2004 Usage spacer Attributes None Child tags None ...

Page 618: ...figURI Commands Trace Selections xml if traceSelectionsDlg dismiss accept fl trace Checkbox 1 traceSelectionsDlg checkbox1 fl trace Checkbox 2 traceSelectionsDlg checkbox2 fl trace Checkbox 3 traceSelectionsDlg checkbox3 fl trace Checkbox 4 traceSelectionsDlg checkbox4 fl trace Checkbox 5 traceSelectionsDlg checkbox5 Next create a file named Trace Selections xml this example does not use the space...

Page 619: ...pacer tag to the Trace Selections xml file dialog id traceSelections title Trace Selections buttons accept cancel vbox hbox checkbox id checkbox1 label checkbox1 checkbox id checkbox2 label checkbox2 checkbox id checkbox3 label checkbox3 hbox hbox spacer checkbox id checkbox4 label checkbox4 checkbox id checkbox5 label checkbox5 hbox vbox dialog Adding the spacer tag to the second row of check box...

Page 620: ...ML to UI vbox Availability Flash MX 2004 Usage vbox child tags vbox Attributes None Child tags hbox vbox control tags Parent tag grid Description Layout tag creates a container for items laid out vertically ...

Page 621: ...ontrol ySkew align left popupslider id ySkew minvalue 180 maxvalue 180 hbox hbox label value Edge control edge align left menulist id edge menupop menuitem label top center menuitem label right center menuitem label bottom center menuitem label left center menupop menulist hbox vbox dialog The following figure shows the Skew Selection dialog box defined using vbox and hbox tags instead of the grid...

Page 622: ...n Windows accesskey String a character to be used for the keyboard shortcut for this control available only on Windows oncommand A JavaScript command that executes when the button is clicked Child tags None Parent tag dialog hbox row vbox Description Control tag creates a button control Example The following example uses the JavaScript API to create a new command that appears in Commands menu Crea...

Page 623: ...ollowing code into the file and save the file xml version 1 0 dialog id button dialog title Button Example buttons accept cancel grid columns column columns rows row label width 150 value The following buttons will send text to the Output Panel row row button id helloBtn label Hello oncommand fl trace Hello row row button id worldBtn label world oncommand fl trace world row rows grid dialog The bu...

Page 624: ...eturns label String text that appears next to the check box tabindex Number an integer used to set the control s position in the tab order available only on Windows checked Boolean value set the default value If true the box is checked when the dialog box first appears false otherwise accesskey String a character to be used for the keyboard shortcut for this control available only on Windows Child...

Page 625: ...alse pathtype relative absolute required true false size mySize tabindex myIdx type open save value myValue width myWidth Attributes id String represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns literal Boolean value if true then the value returned from this control is enclosed by quotation marks If false whic...

Page 626: ...o the operating system s file selection dialog box Example The following example uses the JavaScript API to create a new command that appears in Commands menu Create two files as described in this section and place them in your Commands folder in your user level configuration folder For more information see Configuration folders installed with Flash in Getting Started with Flash First create a fil...

Page 627: ...mmand now appears on the Commands menu If you have a Flash document open you can select the choosefile command from the Commands menu and the dialog box defined by choosefile xml appears as shown in the following figure colorchip Availability Flash MX 2004 Usage colorchip id myID color myColor Attributes id String represents a unique identification string that is used by the extensibility features...

Page 628: ...nto the file and save the file Create an XML to UI dialog box using the XML definition in the setcolor xml file var setcolorDlg fl getDocumentDOM xmlPanel fl configURI Commands setcolor xml if setcolorDlg dismiss accept fl getDocumentDOM setFillColor setcolorDlg fillColor fl getDocumentDOM setStrokeColor setcolorDlg strokeColor Second create a file named setcolor xml and place it in your Commands ...

Page 629: ... 2004 Usage flash id myID width x height y src SWF file child tags flash Attributes id String represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns width Number sets the width of the flash control measured in pixels height Number sets the height of the flash control measured in pixels src String path to the SWF ...

Page 630: ... property id first property id dur property id hor property id vert property id regPoint property id blur_amount property id baseScale flash dialog label Availability Flash MX 2004 Usage label control myControlID accesskey char value myText align left center right Attributes control String the string identifier that matches the ID value of an associated control accesskey String a character to be u...

Page 631: ...ing example is excerpted from the HideScreen xml file which defines the Hide Screen Behavior dialog id SelectScreenDialog title Select Screen buttons accept cancel vbox hbox label value Select Screen control TARGET targetlist id TARGET class screen hbox vbox dialog listbox Availability Flash MX 2004 Usage listbox id myID tabindex myIdx rows numRows child tags listbox ...

Page 632: ...row vbox Description Control tag creates a listbox control to contain listitem tags Example The following example modifies the skew command example from popupslider so that it uses a listbox control instead of a menulist control for the edge parameter to the JavaScript skewSelection method The example uses the JavaScript API to create a new command that appears on the Commands menu Create two file...

Page 633: ...r ySkew Number skewlistDlg ySkew var edge skewlistDlg edge if skewlistDlg dismiss accept Place the values of xSkew and ySkew from the dialog box into local variables The code casts converts the values from the dialog box to a number before assigning them to the local variables because the skewSelection method takes numbers for the xSkew and ySkew parameters var xSkew Number skewlistDlg xSkew var y...

Page 634: ...ign left label value Skew y control ySkew align left popupslider id ySkew minvalue 180 maxvalue 180 row row align left label value Edge control edge align left listbox id edge rows 5 listitem label top center listitem label right center listitem label bottom center listitem label left center listbox row rows grid dialog The skewlist command now appears on the Commands menu Draw a shape on the Stag...

Page 635: ... in the listbox for that item value String text that is returned if the user selects the item If not set the value of the label attribute is returned Child tags None Parent tag listbox Description Control tag creates an individual item in a list box control This tag must be used within a listbox tag Example See the example for listbox ...

Page 636: ...nuitem menupop menulist Attributes id String represents a unique identification string that is used by the extensibility features to identify the control and access the value it returns tabindex Number an integer used to set the control s position in the tab order available only on Windows Child tags menupop ...

Page 637: ...in your user level configuration folder For more information see Configuration folders installed with Flash in Getting Started with Flash First create a file named Convert to Symbol jsfl and place it in your Commands folder Place the following code into the file and save the file Create an XML to UI dialog box using the XML definition in the Convert to Symbol xml file var convertToSymbolDlg fl get...

Page 638: ...Symbol 1 row row spacer row row align right label value Behavior control type align right radiogroup id type radio label Movie clip radio label Button radio label Graphic radiogroup row row align right label value Registration control registration menulist id registration menupop menuitem label top left menuitem label top center menuitem label top right menuitem label center left menuitem label ce...

Page 639: ...e pointer tool If you then select the Convert to Symbol command from the Commands menu the dialog box defined by Convert to Symbol xml appears as shown in the following figure menupop Availability Flash MX 2004 Usage menulist menupop menuitem menuitem menupop menulist Attributes None Child tags menuitem Parent tag menulist ...

Page 640: ...e the example for menulist menulist id registration menupop menuitem label top left menuitem label top center menuitem label top right menuitem label center left menuitem label center menuitem label center right menuitem label bottom left menuitem label bottom center menuitem label bottom right menupop menulist menuitem Availability Flash MX 2004 Usage menulist menupop menuitem label displayText v...

Page 641: ...op up menu control and must contain at least one menuitem tag Example The following example creates a drop down menu with eight elements To see the XML definition of the entire dialog box see the example for menulist menulist id registration menupop menuitem label top left menuitem label top center menuitem label top right menuitem label center left menuitem label center menuitem label center righ...

Page 642: ... Number an integer that represents the minimum value maxvalue Number an integer that represents the maximum value Child tags None Parent tag dialog hbox row vbox Description Control tag creates a pop up slider control this is not part of the XUL standard Example The following example uses the JavaScript API to create a new command that appears on the Commands menu Create two files as described in ...

Page 643: ...w var ySkew Number skewDlg ySkew var edge skewDlg edge if skewDlg dismiss accept Place the values of xSkew and ySkew from the dialog box into local variables The code casts converts the values from the dialog box to a number before assigning them to the local variables because the skewSelection method takes numbers for the xSkew and ySkew parameters var xSkew Number skewDlg xSkew var ySkew Number ...

Page 644: ...t label value Skew y control ySkew align left popupslider id ySkew minvalue 180 maxvalue 180 row row align left label value Edge control edge align left menulist id edge menupop menuitem label top center menuitem label right center menuitem label bottom center menuitem label left center menupop menulist row rows grid dialog The skew command now appears on the Commands menu Draw a shape on the Stag...

Page 645: ... value it returns Child tags None Parent tag flash Description Control tag creates a custom property in an embedded SWF file used with the flash tag This tag is used to declare properties that are specific to a SWF file that is embedded in an XML to UI dialog box Example See the example for flash radiogroup Availability Flash MX 2004 Usage radiogroup id myID label myLabel groupbox true false radio...

Page 646: ...hild tags radio Parent tag dialog hbox row vbox Description Control tag Creates a container for a group of radio button controls This tag allows grouping of radio buttons and must contain at least one radio tag Example The following example defines a group of radio controls that are included in the example for menulist For the complete example see menulist radiogroup id type radio label Movie clip...

Page 647: ...t tag radiogroup Description Control tag creates a single radio button control This tag must be used within a radiogroup tag Example The following example defines a group of radio controls that are included in the example for menulist For the complete example see menulist radiogroup id type radio label Movie clip radio label Button radio label Graphic radiogroup targetlist Category Flash MX 2004 U...

Page 648: ...and absolute Child tags None Description Control tag creates a control that lists all instances of a class and lets the user select an instance Example The following example is excepted from the Load Graphic behavior definition file The tags define a targetlist control that lets users select a movie clip into which a graphic will be loaded For the complete dialog box definition see the Graphic_loa...

Page 649: ...e default setting the returned value does not have quotation marks maxlength Number sets the maximum number of characters that can be entered multiline Boolean value if true more than one line of input is allowed If false which is the default setting only one line of input is allowed size Number an integer that sets the width of the input field using the average character width tabindex Number an ...

Page 650: ...nd yScale from the dialog box into local variables The code casts converts the values from the dialog box to a number before assigning them to the local variables because the scaleSelection method takes numbers as parameters var xScale Number scaleDlg xScale var yScale Number scaleDlg yScale check for valid input because sending 0 or undefined to scaleSelection will cause the object to disappear v...

Page 651: ... or extend Flash 8 you modify these files or add your source files to one or more of these folders By familiarizing yourself with these folders you can learn about the interface for extensibility provided in Flash 8 The Configuration folders exists in three separate locations depending on your operating system The first location Application configuration is relative to the application The second U...

Page 652: ...ments and Settings All Users Local Settings Application Data Macromedia Flash 8 Mac OS Mac OS X Hard Disk Users Shared Library Application Support Macromedia Flash 8 Application Level Configuration Directories The Application configuration folders are File folder name Contents authplay dll authplaylib External Macromedia Flash Player for use within the authoring tool test movie debug movie Compone...

Page 653: ...olbox AsCodeHints xml configuration XML for Code Hinting AsColorSyntax xml configuration XML for Color Syntax highlighting Custom Actions Files used to add custom actions to the toolbox Behaviors XML files that define behaviors Classes ActionScript class files Color Sets Color sets used by the color management system Commands JSFL and XML files that define JavaScript commands available via the Com...

Page 654: ...sets available within Flash MX Publish Profiles Location of XML files that store profiles available in the File Publish Settings dialog Screen Types Data files that define the Slide and Form screens for use in the authoring tool StartPage Location of FLA source files that are placed by File Save As Template and drive the File New from Template dialog Templates Location of FLA source files that are...

Page 655: ...514 testing content 533 titles and descriptions for Flash applications 525 turning off button and text field labels for 521 turning off for selected objects 521 Accessibility button in Property inspector 520 Accessibility panel about 516 Auto Label option 517 Description option 517 Make Child Objects Accessible option 517 Make Object Accessible option 517 Name option 517 name vs auto label 519 Sho...

Page 656: ...nding background images in several frames 251 frame rates 251 frame by frame 264 frames in Timeline 250 graphics compared to movie clips 93 inserting frames 265 linking layers to a motion path 258 modifying or deleting frames in the Timeline 265 motion paths for 257 moving an entire 267 onion skinning 266 Play Once option 94 reversing the sequence of 266 Single Frame option 94 still images 251 twe...

Page 657: ...rt 205 compared to vector graphics 130 compressing as JPEG or PNG files 202 converting to vector graphics 206 editing 204 importing 200 importing with the Clipboard 214 modifying filled areas 205 preserving transparency when importing 192 setting compression options for 202 setting properties for 202 Bitmap Properties dialog box 202 bitmaps finding and replacing 53 Blank Keyframe command 265 blend...

Page 658: ...s panel Add Colors option 127 Clear Colors option 125 loading default palette 126 modifying color palettes and 125 Replace Colors option 127 Save as Default option 126 Save Colors option 127 sorting 126 Web 216 option 126 colors background 25 changing with the Property inspector 115 choosing for text 167 Color Picker opening 115 copying with the Eyedropper tool 124 creating and editing solid 117 d...

Page 659: ...reens 352 Create Copy button in Transform panel 214 createTextField method 185 cumulative tracking data accessing in learning interactions 590 curves adjusting points and tangent handles 144 adjusting segments 143 dragging tangent handles on 144 drawing with Pen tool 140 optimizing 149 straightening and smoothing 147 Custom color palette 472 Custom Ease in Ease Out dialog box 258 Custom option for...

Page 660: ...tor modifying in 24 quitting saving when 27 removing deleted items and saving 58 ruler units setting 24 saving as template 26 saving Flash 25 saving in Flash MX format 26 saving when quitting 27 screen hierarchy 337 size report generating 67 slide presentation 337 speeding up display 64 Stage size setting 24 tabs for multiple documents 25 template creating from 24 template saving as 26 text and fo...

Page 661: ...tion tweening 254 256 for shape tweening 262 Edit Envelope for sounds 317 units in 317 Edit in New Window command 90 Edit in Place command 90 Edit Multiple Frames button 267 Edit Selected command 211 Edit Symbols command 90 editing imported bitmap images 204 reshaping lines and shapes 146 softening edges of an object 151 symbols 89 text 174 Effects menu in the Property inspector 314 embedded fonts...

Page 662: ...ying 234 gradient bevel filter applying 237 gradient glow filter applying 236 saving preset settings 231 Find and Replace overview 48 screens 356 finding and replacing bitmaps 53 colors 51 fonts 50 sound 53 text 49 video 53 Fireworks PNG files importing 195 FLA files printing 68 saving 25 Flash about 13 getting started 13 Flash applications accessibility options for 525 naming for accessibility 52...

Page 663: ...265 editing multiple 267 exporting as static images 501 images registering in 266 inserting 265 keyframes converting into 266 multiple editing 267 onion skinning 266 pasting 265 printing 548 registering images in 266 removing 265 static images exporting as 501 testing performance with Bandwidth profiler 67 Timeline animation frames in 250 Timeline dragging in 265 Frames button in Edit Envelope 317...

Page 664: ...ML formatting for text fields 178 option for dynamic text fields 183 publish settings 464 publishing templates 481 tag reference 488 templates 482 HTML Alignment publish setting 467 hyperlinks viewing in Flash Player 63 I identifiers assigning to sounds 203 316 images exporting 501 importing 191 193 Import command 193 Import for Runtime Sharing option 106 imported video formats for 278 importing b...

Page 665: ...serting 265 motion tweening 257 removing 265 selecting everything between two 209 shape tweening 261 sounds associating with 320 tweened frame sequences dragging in 266 tweening 248 kinds creating custom schema 437 Knowledge Track options setting for a learning interaction 583 L Lasso tool Magic Wand modifier 205 Magic Wand Settings modifier 205 Polygon mode 210 selecting objects with 210 layers g...

Page 666: ...Load External Movie Clip behavior 95 Load Graphic behavior 95 Load Order option 461 loaded documents controlling 41 loadMovie action and levels 37 Lock command 209 Lock Fill modifier 124 logging data operations 410 loop attribute parameter 493 Loop option about 94 for sound 315 LOOP parameter publish settings 465 looping in accessible content 528 of animation sequences 94 lossless compression bitm...

Page 667: ...s 357 selecting items in 47 movie parameter 490 moving entire animation 267 objects 212 MP3 compression for sound 323 sounds importing 312 MSAA Microsoft Active Accessibility 514 multilanguage text creating with Strings panel 370 encoding language 364 include action and 383 non Unicode external files and 385 overview 363 system useCodepage property 385 text variables 384 XMLConnector component 381...

Page 668: ...uttons 87 overlayChildren parameter 350 Override Sound Settings option 463 P Page Setup command Windows only 68 Paint Bucket tool applying fills with 120 Gap Size modifier 121 Lock Fill modifier 124 painting closing gaps with the Paint Bucket tool 121 tools 133 panels Accessibility See Accessibility panel Actions 102 Align 221 222 Color Mixer 117 Color Swatches See Color Swatches panel Component i...

Page 669: ... Macintosh only 68 printers supported 537 printing from authoring environment 68 FLA files 68 Flash Player context menu 548 printing actions 331 PrintJob addPage method 540 object and class 535 orientation property 539 pageHeight property 539 pageWidth property 539 paperHeight property 539 paperWidth property 539 send method 543 start method 537 using the ActionScript class 537 projectors creating...

Page 670: ...eference 154 Recognize Shapes preference 154 Rectangle tool about 137 Round Rectangle modifier 137 Redo command 53 redoing steps with the History panel 55 registering images from frame to frame 266 registration point changing 89 displaying coordinates 102 relative target path 40 Remove Frame command 265 Remove Gradients option 471 474 removing a screen 353 renaming projects or project folders 73 R...

Page 671: ...CORM communication overview 587 preparing compliant learning interactions for web hosting 589 tracking quiz results 583 tracking to a compliant LMS 586 Screen Outline pane about 342 expanding and collapsing 342 resizing 342 selecting screens in 351 showing and hiding 342 screen readers creating reading and tab order for 526 default reading and tab order 525 detecting with ActionScript 531 hiding o...

Page 672: ... Envelope 317 security Flash Player 458 Select Screen dialog box 354 Selectable option for dynamic text 183 for text 172 selectable text 172 selecting adding to a selection 209 connected lines 208 deselecting 209 everything between two keyframes 209 everything in a scene 209 freehand selection area with 210 hiding selection edges 211 keyframes everything between two 209 Lasso tool with 210 locking...

Page 673: ...and pixels 151 snippets adding keyboard shortcuts for 60 Soften Fill Edges command 151 Sound Designer II files importing 312 Sound object using a sound with 203 316 Sound Properties dialog box 322 sounds in accessible applications 525 ADPCM compression 322 buttons adding to 315 compressing for export 321 compression menu options 322 controls editing for 317 efficiently using 325 envelope lines 317...

Page 674: ...ne style selecting 115 Selection tool selecting with 208 swapping color with fill color 115 transparent applying 115 weight selecting 116 width of 116 Subselection tool adjusting line segments 143 showing anchor points 146 substitute fonts deleting 182 specifying 181 turning off alert 182 viewing 181 Sun AU files importing 312 Swap Symbol dialog box 93 SWF files configuring for server MIME type 45...

Page 675: ...options 168 Clipboard importing with 213 color choosing 167 creating 162 device fonts 160 device fonts selecting 172 dynamic text options 183 dynamically formatting 186 editing 174 embedded fonts 160 fields 157 fill color 167 finding and replacing 49 fixed width or height 165 flow horizontal or vertical 165 font and paragraph attributes 166 font substitution 180 font symbols creating 173 font sele...

Page 676: ...7 onion skinning frames 266 parent alias 40 for screens 357 target paths 39 target paths absolute 39 target paths relative 40 Timeline effects adding 244 deleting 248 description and settings 245 editing 248 types of objects 244 Timeline frames copying and pasting 265 deleting 265 dragging 265 Tint effect 92 Tint instance property 92 tolerance for snapping to objects 154 tools Brush 144 Eraser 149...

Page 677: ... importing with Clipboard 213 version control best practices 27 defining site for 74 editing sites 75 opening a file 75 troubleshooting remote folder setup 75 vertical text creating 162 flow 165 preferences 164 video behaviors adding and controlling 302 303 components 304 editing video clips 292 file formats for import 278 finding and replacing 53 FLV files importing 299 FLV files playing external...

Page 678: ...g new 24 Windows Metafile files exporting 509 importing 194 wmode attribute parameter 496 497 WSDL file 413 X XLIFF 377 XML data sources schemas for 416 XML files format in Strings panel 377 importing to Strings panel 380 loading with ActionScript 382 XMLConnector component about 416 multilanguage text 381 XUpdate packet 429 XUpdateResolver component receiving results for 447 updating 429 ...

Reviews: