Macromedia Flash MX 2004-using Flash
|
|
Bookmark Macromedia Flash MX 2004-using Flash |
Digital design concepts and technical guide: foundations of web design using Fireworks MX 2004, Dreamweawer MX 2004, and Macromedia Flash MX 2004 [Book]By Macromedia, Inc. Staff, Anuja Dharkar, Dale Underwood, Scott Tapley - Course Technology (2003) - Paperback - 281 pages - ISBN 0619183977
This student text provides the activity guides for the projects outlined in the Digital Design Curriculum Guide: Foundations of Web Design (0-619-18396-9). The Digital Design Curriculum covers the professional Web design and development process using Macromedia Web tools and develops career skills in information technology for project management, design, research, communication, and technical concepts. This activities text can only be used in conjunction with the Design Curriculum Guide and shou... Read more [ Report abuse or wrong photo | Share your Macromedia Flash MX 2004-using Flash photo ]
Manual
Preview of first few manual pages (at low quality). Check before download. Click to enlarge.
Download
(English)Macromedia Flash MX 2004-using Flash, size: 6.0 MB |
Macromedia Flash MX 2004-using Flash
Video review
Simple Text Animation in Macromedia Flash MX 2004
User reviews and opinions
No opinions have been provided. Be the first and add a new opinion/review.
Documents

Using Flash
Trademarks Add Life to the Web, Afterburner, Aftershock, Andromedia, Allaire, Animation PowerPack, Aria, Attain, Authorware, Authorware Star, Backstage, Bright Tiger, Clustercats, ColdFusion, Contribute, Design In Motion, Director, Dream Templates, Dreamweaver, Drumbeat 2000, EDJE, EJIPT, Extreme 3D, Fireworks, Flash, Flash Lite, Flex, Fontographer, FreeHand, Generator, HomeSite, JFusion, JRun, Kawa, Know Your Site, Knowledge Objects, Knowledge Stream, Knowledge Track, LikeMinds, Lingo, Live Effects, MacRecorder Logo and Design, Macromedia, Macromedia Action!, Macromedia Breeze, Macromedia Flash, Macromedia M Logo and Design, Macromedia Spectra, Macromedia xRes Logo and Design, MacroModel, Made with Macromedia, Made with Macromedia Logo and Design, MAGIC Logo and Design, Mediamaker, Movie Critic, Open Sesame!, Roundtrip, Roundtrip HTML, Shockwave, Sitespring, SoundEdit, Titlemaker, UltraDev, Web Design 101, what the web can be, and Xtra are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. Third-Party Information This guide contains links to third-party websites that are not under the control of Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites. Speech compression and decompression technology licensed from Nellymoser, Inc. (www.nellymoser.com). Sorenson Spark video compression and decompression technology licensed from Sorenson Media, Inc.
Opera browser Copyright 1995-2002 Opera Software ASA and its suppliers. All rights reserved. Apple Disclaimer APPLE COMPUTER, INC. MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE ENCLOSED COMPUTER SOFTWARE PACKAGE, ITS MERCHANTABILITY OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES. THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. THIS WARRANTY PROVIDES YOU WITH SPECIFIC LEGAL RIGHTS. THERE MAY BE OTHER RIGHTS THAT YOU MAY HAVE WHICH VARY FROM STATE TO STATE. Copyright 2004 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without prior written approval of Macromedia, Inc. Acknowledgments Director: Erick Vera Project Management: Julee Burdekin, Erick Vera Writing: Jay Armstrong, Jody Bleyle, Mary Burger, Francis Cheng, Jen deHaan, Stephanie Gowin, Phillip Heinz, Shimul Rahim, Samuel R. Neff Managing Editor: Rosana Francescato Editing: Mary Ferguson, Mary Kraemer, Noreen Maher, Antonio Padial, Lisa Stanziano, Anne Szabla Production Management: Patrice ONeill Media Design and Production: Adam Barnett, Christopher Basmajian, Aaron Begley, John Francis Second Edition: June 2004 Macromedia, Inc. 600 Townsend St. San Francisco, CA 94103
CONTENTS
CHAPTER 1: Working with Flash Documents. 11
Creating or opening a document and setting properties. 12 Using document tabs for multiple documents (Windows only). 14 Saving Flash documents. 14 About adding media content. 16 About creating motion and interactivity. 16 About components. 17 Using the library to manage media assets. 17 About ActionScript. 21 Multiple Timelines and levels. 22 Nested movie clips. 22 Using absolute and relative target paths. 23 Working with scenes. 27 Using the Movie Explorer. 28 Using Find and Replace. 30 Using the Undo, Redo, and Repeat menu commands. 34 Using the History panel. 35 Saving documents when you undo steps. 37 Automating tasks with the Commands menu. 37 About customizing context menus in Flash documents. 39 About the links menu in Flash Player. 39 Speeding up document display. 40 Optimizing Flash documents. 40 Testing document download performance. 41 Printing from the Flash authoring tool. 43
CHAPTER 2: Working with Projects (Flash Professional Only). 45
Creating and managing projects (Flash Professional only). 46 Using version control with projects (Flash Professional only). 49 Troubleshooting remote folder setup (Flash Professional only). 51
CHAPTER 3: Using Symbols, Instances, and Library Assets. 53
Types of symbols. 54 About controlling instances and symbols with ActionScript. 55 Creating symbols. 55 Creating instances. 58 Creating buttons. 58 Enabling, editing, and testing buttons. 60 Editing symbols. 61 Changing instance properties. 62 Controlling instances with behaviors. 65 Breaking apart instances. 67 Getting information about instances on the Stage. 67 Copying library assets between documents. 68 Using shared library assets. 69 Resolving conflicts between library assets. 72
CHAPTER 4: Working with Color. 75
Using the Stroke Color and Fill Color controls in the Tools panel. 76 Using the Stroke Color and Fill Color controls in the Property inspector. 76 Working with solid colors and gradient fills in the Color Mixer. 77 Modifying strokes with the Ink Bottle tool. 79 Applying solid, gradient, and bitmap fills with the Paint Bucket tool. 79 Transforming gradient and bitmap fills. 80 Copying strokes and fills with the Eyedropper tool. 81 Locking a gradient or bitmap to fill the Stage. 82 Modifying color palettes. 82
CHAPTER 5: Drawing. 85
About vector and bitmap graphics. 85 Flash drawing and painting tools. 87 About overlapping shapes in Flash. 88 Drawing with the Pencil tool. 88 Drawing straight lines, ovals, and rectangles. 89 Drawing polygons and stars. 90 Using the Pen tool. 90 Painting with the Brush tool. 95 Reshaping lines and shape outlines. 97 Erasing. 99 Modifying shapes. 100 Snapping. 101 Specifying drawing settings. 103
Contents
CHAPTER 6: Working with Text. 105
About Unicode text encoding in Flash applications. 107 About font outlines and device fonts. 107 Creating text. 108 Creating scrolling text. 110 Setting text attributes. 111 Creating font symbols. 116 Editing text. 117 Checking spelling. 117 About transforming text. 119 Using Timeline effects with text. 119 Breaking text apart. 120 Linking text to a URL (horizontal text only). 120 Preserving rich text formatting. 121 Substituting missing fonts. 122 Controlling text with ActionScript. 124 Creating scrolling text. 128
CHAPTER 7: Using Imported Artwork. 131
Placing artwork into Flash. 131 Working with imported bitmaps. 138
CHAPTER 8: Working with Graphic Objects. 143
Selecting objects. 144 Grouping objects. 146 Moving, copying, and deleting objects. 147 Stacking objects. 149 Transforming objects. 150 Flipping objects. 154 Restoring transformed objects. 154 Aligning objects. 155 Breaking apart groups and objects. 155
CHAPTER 9: Creating Motion. 157
Using Timeline effects. Tweened animation. Frame-by-frame animation. Layers in animation. Creating keyframes. Representations of animations in the Timeline. Frame rates. Extending still images. Distributing objects to layers for tweened animation. Tweening instances, groups, and type. Tweening motion along a path.
APPENDIX A: Using Samples and Templates. 421
Using samples. 421 Using templates. 424
APPENDIX B: XML to UI. 435
Layout tag summary for XML to UI dialog boxes. Control tag summary for XML to UI dialog boxes. <column>. <columns>. <dialog>. <grid>. <hbox>. <row>. <rows>. <separator>. <spacer>. <vbox>. <button>. <checkbox>. <choosefile>. <colorchip>. <flash>. <label>. <listbox>. <listitem>. <menulist>. <menupop>. <menuitem>. <popupslider>. <property>. <radiogroup>. <radio>. <targetlist>. <textbox>.
INDEX. 471
CHAPTER 1 Working with Flash Documents
When you create and save Macromedia Flash MX 2004 and Macromedia Flash MX Professional 2004 documents within the Flash authoring environment, the documents are in FLA file format. To display a document in Macromedia Flash Player, you must publish or export the document as a SWF file.
Note: For information on publishing or exporting a file, see Chapter 15, Publishing, on page 309 or Chapter 16, Exporting, on page 345.
You can add media assets to a Flash document and manage the assets in the library, and you can use the Movie Explorer to view and organize all the elements in a Flash document. The Undo and Redo commands, the History panel, and the Commands menu let you automate tasks in a document. This chapter contains the following sections: Creating or opening a document and setting properties. 12 Using document tabs for multiple documents (Windows only). 14 Saving Flash documents. 14 About adding media content. 16 About creating motion and interactivity. 16 About components. 17 Using the library to manage media assets. 17 About ActionScript. 21 Multiple Timelines and levels. 22 Nested movie clips. 22 Using absolute and relative target paths. 23 Working with scenes. 27 Using the Movie Explorer. 28 Using Find and Replace. 30
Using the Undo, Redo, and Repeat menu commands. 34 Using the History panel. 35 Saving documents when you undo steps. 37 Automating tasks with the Commands menu. 37 About customizing context menus in Flash documents. 39 About the links menu in Flash Player. 39 Speeding up document display. 40 Optimizing Flash documents. 40 Testing document download performance. 41 Printing from the Flash authoring tool. 43
To define a site for version control:
1. Create a new project and add files. See Creating and managing projects (Flash Professional
only) on page 46.
2. Select File > Edit Sites. 3. In the Edit Sites dialog box, click New. 4. In the Site Definition dialog box, enter the site name, the local root path, and the e-mail address
and name of the user.
5. To specify a local, network, or FTP connection, select Local/Network or FTP from the
Connection menu. Enter the location information for the Local/Network path or for the FTP connection and skip the next step.
6. To specify a Visual SourceSafe database, select SourceSafe Database from the Connection
Note: SourceSafe database support is available for Windows only. You must have Microsoft Visual SourceSafe Client version 6 installed.
a In the 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 sites root directory.
c In the Username and Password text boxes, enter your login user name and password for the
selected database. If you dont know your username and password, check with your system administrator.
d Click OK to return to the Site Definition dialog box. 7. In the Flash Project panel (Window > Project), select Settings from the Project pop-up menu
or context menu.
8. In the Project Settings dialog box, select the site definition from the Site menu in the Version
Control section. Click OK.
9. In the Project pop-up menu, select Check In. Flash checks all files in the current project
into the site.
To edit a file with version control applied:
1. Open the project that contains the file, as described in Creating and managing projects (Flash
Professional only) on page 46.
2. Select the file in the tree structure in the project panel and select Check Out from the project
6. To draw the next segment of a curve, position the pointer where you want the next segment to
end, and drag away from the curve. Adjusting anchor points on paths When you draw a curve with the Pen tool, you create curve pointsanchor points on a continuous, curved path. When you draw a straight line segment, or a straight line connected to a curved segment, you create corner pointsanchor points on a straight path or at the juncture of a straight and a curved path. By default, selected curve points appear as hollow circles, and selected corner points appear as hollow squares.
To convert segments in a line from straight segments to curve segments or the reverse, you convert corner points to curve points or the reverse.
You can also move, add, or delete anchor points on a path. You move anchor points using the Subselection tool to adjust the length or angle of straight segments or the slope of curved segments. You can 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 following:
To convert a corner point to a curve point, use the Subselection tool to select the point, then
Alt-drag (Windows) or Option-drag (Macintosh) the point to place the tangent handles.
To convert a curve point to a corner point, click the point with the Pen tool.
To add an anchor point:
Click a line segment with the Pen tool.
To delete an anchor point, do one of the following:
To delete a corner point, click the point once with the Pen tool. To delete a curve point, click the point twice with the Pen tool. (Click once to convert the
point to a corner point, and once more to delete the point.)
Select the point with the Subselection tool and press Delete.
Adjusting segments You can adjust straight segments to change the angle or length 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 turn object snapping on or off:
Select View > Snapping > Snap to Objects. A check mark is displayed next to the command
when it is on. When you move or reshape an object, the position of the Selection tool on the object provides the reference point for the snap ring. For example, if you move a filled shape by dragging near its center, the center point snaps to other objects. This is particularly useful for snapping shapes to motion paths for animating.
Note: For better control of object placement when snapping, begin dragging from a corner or center point. To adjust object snapping tolerances:
2. Under Drawing Settings, adjust the Connect Lines setting. See Specifying drawing settings
on page 103. 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 represents the individual pixels that will appear in your Flash application. When you create or move an object, it is constrained to the pixel grid. If you create a shape whose edges fall between pixel boundariesfor example, if you use a stroke with a fractional width, such as 3.5 pixelskeep in mind that Snap to Pixels snaps to pixel boundaries, and not to the edge of the shape.
To turn pixel snapping on or off:
Select View > Snapping > Snap to Pixels.
If the magnification is set to 400% or higher, a pixel grid is displayed. A check mark is displayed next to the command when it is on.
To turn pixel snapping on or off temporarily:
Press the C key. When you release the C key, pixel snapping returns to the state you selected
with View > Snapping > Snap to Pixels.
To temporarily hide the pixel grid:
Press the X key. When you release the X key, the pixel grid reappears.
Snap alignment You can turn on Snap Alignment using the Snap Align command in the View menu. You can select settings for Snap Alignment using the Edit Snap Align command in the View menu. When you select Snap Alignment settings, you can set the snap tolerance between horizontal or vertical edges of objects, and between objects edges and the Stage border. You can also turn on snap alignment between the horizontal and the vertical centers of objects. All Snap Alignment settings are measured in pixels. When 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 the horizontal center vertices of two objects when you precisely align the vertices.
text block.
For static horizontal text with a defined width, a square handle appears at the upper right
corner of the text block.
For static vertical text that has right-to-left orientation and extends, 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 orientation and a fixed height, a square handle appears
at the lower right corner of the text block.
For dynamic or input text blocks that extend, a round handle appears at the lower right corner
of the text block.
For dynamic or input text with a defined height and width, a square handle appears at the
lower right corner of the text block.
For dynamic scrollable text blocks, the round or square handle becomes solid black instead of
hollow. See Creating scrolling text on page 128.
You can Shift-double-click the handle of dynamic and input text fields to create text blocks that dont expand when you enter text on the Stage. This allows you to create a text block of a fixed size and fill it with more text than it can display to create scrolling text. See Creating scrolling text on page 128. After you use the Text tool to create a text field, you use the Property inspector to indicate which type of text field you want and set values to control how the text field 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. 4. Select No Kerning to prevent kerning from being applied to vertical text. (Kerning remains
enabled for horizontal text.) For more information on kerning, seeSetting character spacing, kerning, and character position on page 113.
To create text:
1. Select the Text tool. 2. Select Window > Properties. 3. In the Property inspector, select a text type from the pop-up menu to specify the type of
To make a dynamic text block scrollable, do one of the following:
Shift-double-click the handle on the dynamic text block. Select the dynamic text block with the Selection tool and select Text > Scrollable. Select the dynamic text block with the Selection tool. Right-click (Windows) or Control-click
(Macintosh) the dynamic text block and select Text > Scrollable.
Setting text attributes
You can set the font and paragraph attributes of text. Font attributes include font family, point size, style, color, character spacing, autokerning, and character position. Paragraph attributes include alignment, margins, indents, and line spacing. You can optimize text to make text more readable at small sizes. See About aliasing text on page 111. For static text, font outlines are exported in a published SWF file. You can choose to use device fonts, rather than exporting font outlines (horizontal text only). See About font outlines and device fonts on page 107. For dynamic or input text, Flash stores the names of the fonts used in creating the text. Flash Player uses the names to locate identical or similar fonts on the users system when the Flash application is playing. You can also choose to embed font outlines in dynamic or input text fields. Embedding font outlines can increase file size, but it ensures that users have the correct font information. See Setting dynamic and input text options on page 115. When text is selected, you use the Property inspector to change font and paragraph attributes, and to direct Flash to use device fonts rather than embedding font outline information. When creating new text, Flash uses the current text attributes. To change the font or paragraph attributes of existing text, you must first select the text. About aliasing text The Alias Text button in the Property inspector lets you render text so that it appears more readable at small sizes. This option is supported for static, dynamic, and input text if the end user has Flash Player 7 or later. It is supported only for static text if the user has an earlier version of Flash Player. See Choosing a font, point size, style, and color on page 112. The Alias Text option makes small text more readable by aligning text outlines along pixel boundaries. This makes the text appear aliased, even when anti-aliasing is enabled. For information on anti-aliasing text, see Speeding up document display on page 40. When Alias Text is enabled, all text in the current selection is affected. The feature operates with text of all point sizes in the same way.
1. With the document active in Flash, select Edit > Font Mapping. 2. Select a substitute font, as described in the preceding procedure.
To view all the font mappings saved on your system and delete font mappings:
1. Close all documents in Flash. 2. Select Edit > Font Mapping. 3. To delete a font mapping, select the mapping and press Delete. 4. Click OK.
To turn off the Missing Fonts alert, do one of the following:
To turn the alert off for the current document, in the Missing Fonts alert box select Dont
Show Again for This Document, Always Use Substitute Fonts. Select Edit > Font Mapping to view mapping information for the document again.
To turn the alert off for all documents, select Edit > Preferences (Windows) or Flash >
Preferences (Macintosh) and click the Warnings tab. Deselect Warn on Missing Font and click OK. Select the option again to turn alerts on.
Controlling text with ActionScript
A dynamic or input text field is an instance of the ActionScript TextField object. When you create a text field, you can assign it an instance name in the Property inspector. You can use the instance name in ActionScript statements to set, change, and format 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 field. You can use a text fields variable name or instance name to assign it text that contains HTML tags. Flash preserves the rich text formatting applied to the text field with ActionScript. If you assign a variable to a text field, the text field displays the variables value. You can use ActionScript to pass the variable to other parts of the Flash application, to a server-side application for storing in a database, and so on. You can also replace the value of the variable by reading it from a server-side application or by loading it from another part of the Flash application. For more information on using variables, see About variables in Using ActionScript Flash. For more information about connecting to external applications, see Chapter 11, Working with External Data,in Using ActionScript Flash. Creating and removing text fields dynamically You can use the createTextField method of the MovieClip object to create a new, empty text field as a child of the movie clip that calls the method. You can use the removeTextField method to remove a text field created with createTextField; this method will not work on a text field created manually on the Timeline. When you create a text field, you can use the TextField object to set properties of the text field. If you dont set the properties, the new text field receives a set of default properties. The default properties of the new text field are as follows:
Motion tweens are indicated by a black dot at the beginning keyframe; intermediate tweened
frames have a black arrow with a light blue background.
Shape tweens are indicated by a black dot at the beginning keyframe; intermediate frames have
a black arrow with a light green background.
A dashed line indicates that the tween is broken or incomplete, such as when the final
keyframe is missing.
A single keyframe is indicated by a black dot. Light gray frames after a single keyframe contain
the same content with no changes and have a black line with a hollow rectangle at the last frame of the span.
A small a indicates that the frame has been assigned a frame action with the Actions panel. A red flag indicates that the frame contains a label or comment. A gold anchor indicates that the frame is a named anchor. Frame rates
The frame rate, the speed at which the animation is played, is measured in number of frames per second. A frame rate thats too slow makes the animation appear to stop and start; a frame rate thats too fast blurs the details of the animation. A frame rate of 12 frames per second (fps) usually gives the best results on the web. QuickTime and AVI 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, its a good idea to set this rate before you begin creating animation. See Creating or opening a document and setting properties on page 12.
Frame rates
Extending still images
When you create a background for animation, its often necessary that a still image remain the same for several frames. Adding a span of new frames (not keyframes) to a layer extends the contents of the last keyframe in all the new frames.
To extend a still image through multiple frames:
1. Create an image in the first keyframe of the sequence. 2. Select a frame to the right, marking the end of the span of frames that you want to add. 3. Select Insert > Timeline > Frame.
To use a shortcut to extend still images:
1. Create an image in the first keyframe. 2. Alt-drag (Windows) or Option-drag (Macintosh) the keyframe to the right. This creates a span
of new frames, but without a new keyframe at the end point.
Distributing objects to layers for tweened animation
You can quickly distribute selected objects in a frame to separate layers to apply tweened animation to the objects. The objects can be on one or more layers initially. Flash distributes each object to a new, separate layer. Any objects that you dont select (including objects in other frames) are preserved in their original positions. You can apply the Distribute to Layers command to any type of element on the Stage, including graphic objects, instances, bitmaps, video clips, and broken-apart text blocks. Applying the Distribute to Layers command to broken-apart text makes it easy to create animated text. The characters in the text are placed in separate text blocks during the Break Apart operation, and each text 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 120. New layers New layers created during the Distribute to Layers operation are named according to the name of the element that each contains:
5. For Audio Track, select one of the following options to specify how audio can be imported:
Separate
imports the audio track as a sound object, separate from the video file. imports the audio track as part of the video file.
Integrated None
does not import the audio track.
6. Click Next. 7. Enter a name and description for the Advanced Settings to save the settings. The name
appears in the Advanced Settings pop-up menu the next time you use the Video Import wizard. Click Next.
8. Click Finish to close the Video Import wizard and import the video. 9. If you selected Current Timeline or Graphic Symbol for Track Options, a warning appears if
the imported clip contains more frames than the current Timeline. Do one of the following:
Importing Macromedia Flash Video (FLV) files
The FLV file format lets you import or export a static video stream with encoded audio. This format can be used with communications applications, such as video conferencing. Files in the FLV format are compressed with the Sorensen codec. For more information, see About the Sorenson Spark codec on page 179. You can import files in the FLV format using the Import or Import to Library commands or the Import button in the Embedded Video Properties dialog box.
To import a video clip in FLV format, do one of the following:
Select File > Import or File > Import to Library. Select any existing video clip in the Library panel, and select Properties from the Library
options menu. In the Embedded Video Properties dialog box, click Import. Locate the file you want to import, and click Open in the Open dialog box.
Importing linked QuickTime video files
If you are importing a QuickTime video clip, you can link to the video from the Flash file, rather than embed the video. A linked QuickTime video imported into Flash does not become part of the Flash file. Instead, Flash maintains a pointer to the source file. If you link to a QuickTime video, you must publish the SWF file as a QuickTime video. You cannot display a linked QuickTime in SWF format. The QuickTime 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 325. You can scale, rotate, and animate a linked QuickTime video in Flash. However, you cannot tween linked QuickTime video content in Flash.
Movie Explorer about 28 context menu 29 displaying symbol definition 68 filtering displayed items in 28 Find text box 28 instance information 67 instances in 67 options menu 29 for screens 230 selecting items in 29 movie parameter 335 moving entire animation 174 objects 147 MP3 compression, for sound 210 sounds, importing 202 MSAA (Microsoft Active Accessibility) 357 multilanguage text creating with Strings panel 240 encoding language 236 #include action and 249 non-Unicode external files and 251 overview 235 system.useCodepage property 251 text variables 250 XMLConnector component 248 Multiline option, for dynamic text 115 multilingual content sample application 422 Multiple Choice interaction adding and removing distractors in 406 asset names 411 configuring in the Component inspector 406 multiple Timelines, and screens 231 N names choosing for accessibility 361 navigation in a quiz 413 Netscape Navigator 310 New command 12 New Document dialog box 221 New Font option, in Library panel 116 New from Template command 13 New Symbol command 56 news reader sample application 423 No Kerning option 109
O objects accessibility options, defining 362 aligning 155 bringing forward 149 bringing to front 149 copying 148 copying when transforming 148 cutting 149 deleting 149 distorting 152, 153 dragging 147 drawing order 149 Envelope modifier, modifying with 153 erasing 99 flipping 154 grouping 146 hiding from screen readers 363 making accessible 360 matching size 155 modifying with Envelope modifier 153 moving 147 pasting 148 resizing 153 restoring transformed 154 rotating 153 scaling 153 selecting 144 selecting with a selection marquee 144 selection highlighting 144 sending backward 149 sending to back 149 size, matching 155 skewing 154 snapping 101 stacking 149 transformed, copying 148 transformed, restoring 154 transforming freely 151 onion skin markers changing display of 173 moving 173 Onion Skin Outlines button 173 onion skinning 173 opaque windowless mode, and accessibility 358 Open as Library command 18 Open command 13 opening a document 12 Optimize option 99
optimizing curves 99 documents 40 GIF colors 320 PNG colors 323 Orient to Path option, for motion tweening 166, 167 Outlines command 40 Oval tool 89 Over state (for buttons) 59 overlayChildren parameter 225 Override Sound Settings option 314 P Page Setup command (Windows only) 44 Paint Bucket tool applying fills with 79 Gap Size modifier 79 Lock Fill modifier 82 painting closing gaps with the Paint Bucket tool 79 tools 87 panels Accessibility. See Accessibility panel Actions 67 Align 155 Color Mixer 77 Color Swatches. See Color Swatches panel Component Inspector. See Component inspector Flash Project 46 History. See History panel Info. See Info panel Library. See Library panel Scene 27 Strings. See Strings panel Transform. See Transform panel parameters, for screens 225 _parent alias 25 parent screen, defined 218 parent-child relationships 23 passwords for debugging files 314 Paste command 148 Paste Frames command 172 Paste in Place command 148 pasting history steps 36 objects 148 screens 227 path expression for data binding 267, 302
paths adjusting anchor points in 94 tweening along 168 Pen tool adjusting anchor points with 94 corner points 93 curve points 93 drawing curved paths 92 drawing straight lines 91 pointer 91 preferences 90 using 90 Pencil tool drawing modes 89 drawing with 88 smoothing curves 103 straightening lines 103 photo scrapbook sample application 422 Photo Slideshow template 427 PICT files exporting 349 importing 134 pixel snapping 101 play attribute/parameter 337 play modes, graphic instances 64 Play Once option 65 PLAY parameter publish settings 316 playHidden parameter 225 playing Flash content 342 pluginspage attribute 336 PNG files exporting 350 importing 133, 134 PNG filter options 324 publishing 322 PNG Import Settings dialog box 134 point size, choosing 112 Polygon mode, for Lasso tool 145 PolyStar tool 90 preferences Drawing Settings options 103 Pen tool 90 Show Pen Preview option 91 Show Precise Cursors option 91 Show Solid Points option 91 vertical text 109 presentation templates 428 previewing with Publish Preview command 342 Print command 44 Print Margins command (Macintosh only) 44
printers, supported 376 printing from authoring environment 43 FLA files 43 Flash Player context menu 385 PrintJob addPage method 378 object and class 375 orientation property 378 pageHeight property 378 pageWidth property 378 paperHeight property 378 paperWidth property 378 send method 381 start method 376 using the ActionScript class 376 projectors creating 311 playing with stand-alone player 342 stand-alone movie 310 projects adding a file 47 closing 48 closing files in 48 creating 46 creating a folder 47 deleting files or folders 47 finding missing files 49 Flash Project panel 46 moving files or folders 47 opening 46 opening files 47 Project pop-up menu 46 publishing 48 renaming 48 saving files in 48 selecting publish profiles for 48 testing 47 version control with 49 properties sound 203 symbol instance 62 Properties command 14 Property inspector changing units in 147 font properties 113 instances, for 67 modifying document properties 14 moving objects 147 screens, for 223
sound properties 203 Stroke and Fill Color controls in 76 tools 87 video, changing properties 190 Protect from Import option 313 Publish command 311 Publish Preview command 342 publish profiles, for projects 48 publish settings file formats created 311 generating HTML 315 projectors 311 publishing about 14 projects 48 Q quality attribute/parameter 338 Quality option, for MP3 sound compression 211 QUALITY parameter publish settings 317 question text, adding to a learning interaction 393 QuickTime directory path, setting to video 189 files, exporting 350 files, publishing 325 images, importing 134 linked video, importing 188 movie 310 movies, importing sound only 202 video, previewing in Flash 188 Quit command 15 Quiz component 390 quizzes adding a learning interaction to template 395 navigation options for 413 parameters for 390 preparing for web hosting 416 templates for 389 testing 400 R Radial Gradient option 78 Raw compression, for sound 211 RDBMSResolver component results for 306 updates for 288 reading order in Accessibility panel 367 in ActionScript 371 default in Flash Player 366

Benefits of v2 components
Components enable the separation of coding and design. They also allow you to reuse code, either in components you create, or by downloading and installing components created by other developers.
Components allow coders to create functionality that designers can use in applications. Developers can encapsulate frequently used functionality into components and designers can customize the look and behavior of components by changing parameters in the Property inspector or the Component Inspector panel. Members of the Flash community can use the Macromedia Exchange to exchange components. By using components, you no longer need to build each element in a complex web application from scratch. You can find the components you need and put them together in a Flash document to create a new application. Components that are based on the v2 component architecture share core functionality such as styles, event handling, skinning, focus management, and depth management. When you add the first v2 component to an application, there is approximately 25K added to the document that provides this core functionality. When you add additional components, that same 25K is reused for them as well, resulting in a smaller increase in size to your document than you may expect. For information about upgrading v1 components to v2 components, see Upgrading v1 components to v2 architecture on page 25.
Categories of components
Components included with Flash MX 2004 and Flash MX Professional 2004 fall into four categories: user interface (UI) controls, containers, data, and managers. UI controls allow a user to interact with an application; for example, the RadioButton, CheckBox, and TextInput components are UI controls. Containers are shells for different types of content, such as loaded SWF files and JPEG files; the ScrollPane and Window components are containers. Data components allow you to load and manipulate information from data sources; the WebServiceConnector and XMLConnector components are data components. Managers are non-visual components that allow you to manage a feature, such as focus or depth, in an application; the FocusManager, DepthManager, PopUpManager, and StyleManager are the manager components included with Flash MX 2004 and Flash MX Professional 2004. For a complete list of each category, see Chapter 4, Macromedia Flash MX 2004 and Macromedia Flash MX Professional 2004 Components, on page 45.
Component architecture
You can use the Property inspector or the Component Inspector panel to change component parameters to make use of the basic functionality of components. However, if you want greater control over components, you need to use their APIs and understand a little bit about the way they were built. Flash MX 2004 and Flash MX Professional 2004 components are built using version 2 (v2) of the Macromedia Component Architecture. Version 2 components are supported by Flash Player 6 and Flash Player 7. These components are not always compatible with components built using version 1 (v1) architecture (all components released before Flash MX 2004). Also, v1 components are not supported by Flash Player 7. For more information, see Upgrading v1 components to v2 architecture on page 25. V2 components are included in the Components panel as compiled clip (SWC) symbols. A compiled clip is a component movie clip whose code has been compiled. Compiled clips have built-in live previews and cannot be edited, but you can change their parameters in the Property inspector and Component Inspector panel, just as you would with any component. For more information, see About compiled clips and SWC files on page 14.
_global.style.setStyle("color", 0xCC6699); _global.style.setStyle("themeColor", "haloBlue") _global.style.setStyle("fontSize",16); _global.style.setStyle("fontFamily" , "_serif");
For a list of styles, see Supported styles on page 33. 6 Select Control > Test Movie to see the changes.
Setting styles for specific components You can create custom style declarations to specify a unique set of properties for specific components in your Flash document. You create a new instance of the CSSStyleDeclaration object, create a custom style name and place it on the _global.styles list (_global.styles.newStyle), specify the properties and values for the style, and assign the style to an instance. The CSSStyleDeclaration object is accessible if you have placed at least one component instance on the Stage. You make changes to a custom style format in the same way that you edit the properties in the _global style declaration. Instead of the _global style declaration name, use the CSSStyleDeclaration instance. For more information on the _global style declaration, see Setting global styles on page 29. For information about the properties of the CSSStyleDeclaration object, see Supported styles on page 33. For a list of which styles each component supports, see their individual entries in Chapter 4, Macromedia Flash MX 2004 and Macromedia Flash MX Professional 2004 Components, on page 45.
To create a custom style declaration for specific components:
For more information, see Adding components to Flash documents on page 18. This example uses three button components with the instance names a, b, and c. If you use different components, give them instance names in the Property inspector and use those instance names in step 9. Create a new layer in the Timeline and give it a name. Select a frame in the new layer on which (or before) the component appears. Open the Actions panel in expert mode. Use the following syntax to create an instance of the CSSStyleDeclaration object to define the new custom style format:
var styleObj = new mx.styles.CSSStyleDeclaration;
6 Set the styleName property of the style declaration to name the style:
styleObj.styleName = "newStyle";
7 Place the style on the global style list:
_global.styles.newStyle = styleObj; Note: You can also create a CSSStyleDeclaration object and assign it to a new style declaration by using the following syntax: var styleObj = _global.styles.newStyle = new mx.styles.CSSStyleDeclaration();
8 Use the following syntax to specify the properties you want to define for the myStyle style
declaration:
styleObj.fontFamily = "_sans"; styleObj.fontSize = 14; styleObj.fontWeight = "bold"; styleObj.textDecoration = "underline"; styleObj.color = 0x336699; styleObj.setStyle("themeColor", "haloBlue");
Note: The Live Preview of the components on the Stage will not reflect the new theme.
5 Select Control > Test Movie to see the document with the new theme applied.
Creating a new theme If you dont want to use the Halo theme or the Sample theme you can modify one of them to create a new theme. Some skins in the themes have a fixed size. You can make them larger or smaller and the components will automatically resize to match them. Other skins are composed of multiple pieces, some static and some that stretch. Some skins (for example, RectBorder and ButtonSkin) use the ActionScript Drawing API to draw their graphics because it is more efficient in terms of size and performance. You can use the ActionScript code in those skins as a template to adjust the skins to your needs.
To create a new theme:
1 Select the theme FLA file that you want to use as a template and make a copy. 4
Give the copy a unique name like MyTheme.fla. Select File > Open MyTheme.fla in Flash. Select Window > Library to open the library if it isnt open already. Double-click any skin symbol you want to modify to open it in edit symbol mode. The skins are located in the Themes > MMDefault > Component Assets folder (in this example, Themes > MMDefault > RadioButton Assets). Modify the symbol or delete the graphics and create new graphics. You may need to select View > Zoom In to increase the magnification. When you edit a skin, you must maintain the registration point in order for the skin to be displayed correctly. The upper left corner of all edited symbols must be at (0,0). When you have finished editing the skin symbol, click the Back button at the left side of the information bar at the top of the Stage to return to edit document mode. Repeat steps 4 - 6 until youve edited all the skins you want to change. Apply MyTheme.fla to a document by following the steps in the previous section, Applying a theme to a document on page 35.
About skinning components
Skins are symbols a component uses to display its appearance. Skins can either be graphic symbols or movie clip symbols. Most skins contain shapes that represent the components appearance. Some skins contain only ActionScript code that draws the component in the document. Macromedia v2 components are compiled clipsyou cannot see their assets in the library. However, FLA files are installed with Flash that contain all the component skins. These FLA files are called themes. Each theme has a different appearance and behavior, but contains skins with the same symbol names and linkage identifiers. This allows you to drag a theme onto the Stage in a document to change its appearance. For more information about themes, see About themes on page 35. You also use the theme FLA files to edit component skins. The skins are located in the Themes folder in the Library panel of each theme FLA. Each component is composed of many skins. For example, the down arrow of the ScrollBar component is made up of three skins: ScrollDownArrowDisabled, ScrollDownArrowUp, and ScrollDownArrowDown. Some components share skins. Components that use scroll bars including ComboBox, List, ScrollBar, and ScrollPaneshare the skins in the ScrollBar Skins folder. You can edit existing skins and create new skins to change the appearance of a component. The.as file that defines each component class contains code that loads specific skins for the component. Each component skin has a skin property that is assigned to a skin symbols Linkage Identifier. For example, the pressed (down) state of the down arrow of the ScrollBar has the skin property name downArrowDownName. The default value of the downArrowDownName property is "ScrollDownArrowDown", which is the Linkage Identifier of the skin symbol. You can edit skins and apply them to a component by using these skin properties. You do not need to edit the components.as file to change its skin properties, you can pass skin property values to the components constructor function when the component is created in your document. Choose one of the following ways to skin a component based on what you want to do:
Inherits all events from UIObject and UIComponent. CheckBox.click
listenerObject = new Object(); listenerObject.click = function(eventObject){. } checkBoxInstance.addEventListener("click", listenerObject) Description
Event; broadcast to all registered listeners when the mouse is clicked (released) over the check box or if the check box has focus and the Spacebar is pressed. The first usage example uses an on() handler and must be attached directly to a CheckBox component instance. The keyword this, used inside an on() handler attached to a component, refers to the component instance. For example, the following code, attached to the check box myCheckBox, sends _level0.myCheckBox to the Output panel:
The second usage example uses a dispatcher/listener event model. A component instance (checkBoxInstance) dispatches an event (in this case, click) and the event is handled by a listener object (listenerObject) that you create. You define a method with the same name as the event on the listener object; the method is called when the event is triggered. When the event is triggered, it automatically passes an event object (eventObject) to the listener object method. The event object has a set of properties that contains information about the event. You can use these properties to write code that handles the event. Finally, you call the addEventListener() method (see UIEventDispatcher.addEventListener()) on the component instance that broadcasts the event to register the listener with the instance. When the instance dispatches the event, the listener is called. For more information about event objects, see Event Objects on page 249.
This example, written on a frame of the Timeline, sends a message to the Output panel when a button called checkBoxInstance is clicked. The first line of code creates a listener object called form. The second line defines a function for the click event on the listener object. Inside the function is a trace action that uses the event object that is automatically passed to the function (in this example, eventObj) to generate a message. The target property of an event object is the component that generated the event (in this example, checkBoxInstance). The CheckBox.selected property is accessed from the event objects target property. The last line calls the addEventListener() method from checkBoxInstance and passes it the click event and the form listener object as parameters, as in the following:
form = new Object(); form.click = function(eventObj){ trace("The selected property has changed to " + eventObj.target.selected); } checkBoxInstance.addEventListener("click", form);
The following code also sends a message to the Output panel when checkBoxInstance is clicked. The on() handler must be attached directly to checkBoxInstance, as in the following:
on(click){ trace("check box component was clicked"); } See also UIEventDispatcher.addEventListener()
Note: If the array contains strings at each index, and not objects, the list is not able to sort the items and maintain the selection state. Any sorting will lose the selection.
Any instance that implements the DataProvider interface is eligible as a data provider for a List. This includes Flash Remoting RecordSets, Firefly DataSets, and so on.
This example uses an array of strings to populate the drop-down list:
comboBox.dataProvider = ["Ground Shipping","2nd Day Air","Next Day Air"];
This example creates a data provider array and assigns it to the dataProvider property, as in the following:
myDP = new Array(); list.dataProvider = myDP; for (var i=0; i<accounts.length; i++) { // these changes to the DataProvider will be broadcast to the list myDP.addItem({ label: accounts[i].name, data: accounts[i].accountID }); }
ComboBox.dropdown
Usage myComboBox.dropdown
Property (read-only); returns a reference to the List component contained by the combo box. The List subcomponent isnt instantiated in the combo box until it needs to be displayed. However, when you access the dropdown property, the list is created.
See also ComboBox.dropdownWidth
ComboBox.dropdownWidth
Usage myComboBox.change Description
Property; the width limit in pixels of the drop-down list. The default value is the width of the ComboBox component (the TextInput instance plus the SimpleButton instance).
The following code sets the dropdownWidth to 150 pixels:
myComboBox.dropdownWidth = 150; See also ComboBox.dropdown
ComboBox.editable
Usage myComboBox.editable
Property; indicates whether the combo box is editable (true) or not (false). An editable combo box can have values entered into the text box that do not show up in the drop-down list. If a combo box is not editable, only values listed in the drop-down list can be entered into the text box. The default value is false. Setting a combo box to editable clears the combo box text field. It also sets the selected index (and item) to undefined. To make a combo box editable and still retain the selected item, use the following code:
var ix = myComboBox.selectedIndex; myComboBox.editable = true; // clears the text field. myComboBox.selectedIndex = ix; // copies the label back into the text field. Example
The following code makes myComboBox editable:
myComboBox.editable = true;
ComboBox.enter
on(enter){ // your code here }
listenerObject = new Object(); listenerObject.enter = function(eventObject){ // your code here } comboBoxInstance.addEventListener("enter", listenerObject)
Event; broadcast to all registered listeners when the Enter key has been pressed in the text box. This event is only broadcast from editable combo boxes. This is a TextInput event that is broadcast from a combo box. For more information, see TextInput.enter. The first usage example uses an on() handler and must be attached directly to a ComboBox component instance. The keyword this, used inside an on() handler attached to a component, refers to the component instance. For example, the following code, attached to the ComboBox component instance myBox, sends _level0.myBox to the Output panel:
For more information about controlling focus, see Creating custom focus navigation on page 24 or FocusManager on page 102. A live preview of each List instance on the Stage reflects changes made to parameters in the Property inspector or Component Inspector panel while authoring. When you add the List component to an application, you can use the Accessibility panel to make it accessible to screen readers. First, you must add the following line of code to enable accessibility:
mx.accessibility.ListAccImpl.enableAccessibility();
Using the List component You can set up a list so that users can make either single or multiple selections. For example, a user visiting an e-commerce website needs to choose which item to buy. There are 30 items, and the user scrolls through a list and selects one by clicking it. You can also design a list that uses custom movie clips as rows so you can display more information to the user. For example, in an e-mail application, each mailbox could be a List component and each row could have icons to indicate priority and status. List component parameters The following are authoring parameters that you can set for each List component instance in the Property inspector or in the Component Inspector panel:
An array of values that populate the data of the list. The default value is [] (an empty array). There is no equivalent runtime property. An array of text values that populate the label values of list. The default value is [] (an empty array). There is no equivalent runtime property.
labels
multipleSelection A Boolean value that indicates whether you can select multiple values (true) or not (false). The default value is false. rowHeight indicates the height, in pixels, of each row. The default value is 20. Setting a font does
not change the height of a row. You can write ActionScript to set additional options for List instances using its methods, properties, and events. For more information, see List class. Creating an application with the List component The following procedure explains how to add a List component to an application while authoring. In this example, the list is a sample with three items.
To add a simple List component to an application, do the following:
1 Drag a List component from the Components panel to the Stage. 2 Select the list and select Modify > Transform to resize it to fit your application. 3 In the Property inspector, do the following:
Enter the instance name myList. Enter Item1, Item2, and Item3 for the labels parameter. Enter item1.html, item2.html, item3.html for the data parameter. 4 Select Control > Test Movie to see the list with its items. You could use the data property values in your application to open HTML files.
myList.rowCount = myList.rowCount;
This example sets a list to the smallest number of rows it can fully display:
myList.rowCount = 1; trace("myList has "+myList.rowCount+" rows");
List.rowHeight
Usage listInstance.rowHeight Description
Property; the height, in pixels, of every row in the list. The font settings do not make the rows grow to fit, so setting the rowHeight property is the best way to make sure items are fully displayed. The default value is 20.
The following example sets each row to 30 pixels:
myList.rowHeight = 30;
List.scroll
listenerObject = new Object(); listenerObject.scroll = function(eventObject){ // your code here } listInstance.addEventListener("scroll", listenerObject) Event Object
Event; broadcast to all registered listeners when a list scrolls. The first usage example uses an on() handler and must be attached directly to a List component instance. The keyword this, used inside an on() handler attached to a component, refers to the component instance. For example, the following code, attached to the List instance myList, sends _level0.myList to the Output panel:
The second usage example uses a dispatcher/listener event model. A component instance (listInstance) dispatches an event (in this case, scroll) and the event is handled by a listener object (listenerObject) that you create. You define a method with the same name as the event on the listener object; the method is called when the event is triggered. When the event is triggered, it automatically passes an event object (eventObject) to the listener object method. Each event object has a set of properties that contains information about the event. You can use these properties to write code that handles the event. Finally, you call the UIEventDispatcher.addEventListener() method on the component instance that broadcasts the event to register the listener with the instance. When the instance dispatches the event, the listener is called. For more information about event objects, see Event Objects on page 249.
form.scroll = function(eventObj){ trace("list scrolled"); } myList.addEventListener("scroll", form);
List.selectable
Usage listInstance.selectable Description
Property; a Boolean value that indicates whether the list is selectable (true) or not (false). The default value is true. List.selectedIndex
Usage loaderInstance.autoLoad Description
Property; a Boolean value that indicates whether to automatically load the content (true), or wait until Loader.load() is called (false). The default value is true.
The following code sets up the loader component to wait for a Loader.load() call:
loader.autoload = false;
Usage loaderInstance.bytesLoaded Description
Property (read-only); the number of bytes of content that have been loaded. The default value is 0 until content begins loading.
The following code creates a ProgressBar and a Loader component. It then creates a listener object with a progress event handler that shows the progress of the load. The listener is registered with the loader instance, as follows:
createClassObject(mx.controls.ProgressBar, "pBar", 0); createClassObject(mx.controls.Loader, "loader", 1); loadListener = new Object(); loadListener.progress = function(eventObj){ // eventObj.target is the component which generated the change event, // i.e., the Loader. pBar.setProgress(loader.bytesLoaded, loader.bytesTotal); // show progress } loader.addEventListener("progress", loadListener); loader.content = "logo.swf";
When you create an instance with the createClassObject() method, you have to position it on Stage with the move() and setSize() methods. See UIObject.move() and UIObject.setSize().
See also Loader.bytesTotal, UIObject.createClassObject()
Usage loaderInstance.bytesTotal Description
Property (read-only); the size of the content in bytes. The default value is 0 until content begins loading.
The following code creates a ProgressBar and a Loader component. It then creates a load listener object with a progress event handler that shows the progress of the load. The listener is registered with the loader instance, as follows:
createClassObject(mx.controls.ProgressBar, "pBar", 0); createClassObject(mx.controls.Loader, "loader", 1); loadListener = new Object(); loadListener.progress = function(eventObj){ // eventObj.target is the component which generated the change event, // i.e., the Loader. pBar.setProgress(loader.bytesLoaded, loader.bytesTotal); // show progress } loader.addEventListener("progress", loadListener); loader.content = "logo.swf"; See also Loader.bytesLoaded
Using skins with the ProgressBar component The ProgressBar component uses the following movie clip symbols to display its states: TrackMiddle, TrackLeftCap, TrackRightCap and BarMiddle, BarLeftCap, BarRightCap and IndBar. The IndBar symbol is used for an indeterminate progress bar. To skin the ProgressBar component while authoring, modify symbols in the library and re-export the component as a SWC. The symbols are located in the Flash UI Components 2/Themes/MMDefault/ProgressBar Elements folder in the library of the HaloTheme.fla file or the SampleTheme.fla file. For more information, see About skinning components on page 37. If you use the UIObject.createClassObject() method to create a ProgressBar component instance dynamically (at runtime), you can also skin it dynamically. To skin a component at runtime, set the skin properties of the initObject parameter that is passed to the createClassObject() method. The skin properties set the names of the symbols to use as the states of the progress bar.
A ProgressBar component uses the following skin properties:
progTrackMiddleName
Description The expandable middle of the track. The default value is ProgTrackMiddle. The fixed-size left cap. The default value is ProgTrackLeft. The fixed-size right cap. The default value is ProgTrackRight. The expandable middle bar graphic. The default value is ProgBarMiddle. The fixed-size left bar cap. The default value is ProgBarLeft. The fixed-size right bar cap. The default value is ProgBarRight. The indeterminate bar graphic. The default value is ProgIndBar.
progTrackLeftName progTrackRightName progBarMiddleName
progBarLeftName progBarRightName progIndBarName
ProgressBar class
UIObject > ProgressBar mx.controls.ProgressBar
Setting a property of the ProgressBar class with ActionScript overrides the parameter of the same name set in the Property inspector or Component Inspector panel. Each component class has a version property which is a class property. Class properties are only available on the class itself. The version property returns a string that indicates the version of the component. To access the version property, use the following code:
trace(mx.controls.ProgressBar.version); Note: The following code returns undefined: trace(myProgressBarInstance.version);.
Method summary for the ProgressBar class
ProgressBar.setProgress()
Description Sets the progress of the bar in manual mode.
Inherits all methods from UIObject.
Property summary for the ProgressBar class
ProgressBar.conversion
Description A number used to convert the current bytes loaded value and the total bytes loaded values. The direction that the progress bar fills. Indicates that the total bytes of the source is unknown. The text the accompanies the progress bar. The location of the label in relation to the progress bar. The maximum value of the progress bar in manual mode. The minimum value of the progress bar in manual mode. The mode in which the progress bar loads content.
The following code moves the content in increments of 5:
hSB.lineScrollSize = 5;
ScrollBar.maxPos
Usage scrollBarInstance.maxPos Description
Property; sets the upper range of the scroll bar. This property can be set in the initObject parameter of the UIObject.createClassObject() method. The default value is 0.
The following code passes the value of maxPos as a parameter of the createClassObject() method:
createClassObject(HScrollBar, "hSB", 0, {minPos:0, maxPos:100, pageSize:10}); See also ScrollBar.minPos, UIObject.createClassObject()
ScrollBar.minPos
Usage scrollBarInstance.minPos Description
Property; sets the lower range for the scroll bar. This property can be set in the initObject parameter of the UIObject.createClassObject() method. The default value is 0.
The following code passes the value of minPos as a parameter of the createClassObject() method:
createClassObject(HScrollBar, "hSB", 0, {minPos:0, maxPos:100, pageSize:10}); See also ScrollBar.maxPos, UIObject.createClassObject()
ScrollBar.minHeight
Usage scrollBarInstance.minHeight Description
Property (read-only); returns the minimum height of the scroll bar in pixels. The size is determined by the skins used to display the scroll bar.
The following code explains how to size a horizontal scroll bar:
hSB.setSize(100, hSB.minHeight); See also UIObject.setSize()
ScrollBar.minWidth
Usage scrollBarInstance.minWidth Description
Property (read-only); returns the minimum width of the scroll bar in pixels. The size is determined by the skins used to display the scroll bar.
hSB.setSize(minWidth, 100); See also UIObject.setSize()
ScrollBar.pageScrollSize
Usage scrollBarInstance.pageScrollSize Description
Property; the increment to move the display area when the track is pressed. This value is reset to the pageSize parameter of ScrollBar.setScrollProperties() whenever that method is called. The default value is 0.
This example moves the display area by sets of 50 units when the scroll track is pressed. The second line of code checks to see if the property is defined, as in the following:
so on).
A hexadecimal number indicating the color (for example, 0x808080, 0x404040, and
Method; associates a color name with a hexadecimal value and registers it with the StyleManager.
The following example registers "gray" as the color name for the color represented by the hexadecimal value 0x808080:
StyleManager.registerColorName("gray", 0x808080 );
StyleManager.registerColorStyle()
Usage StyleManager.registerColorStyle(colorStyle) Parameters colorStyle A string indicating the name of the "shadowColor", "disabledColor", and so on). Returns
color (for example, "highlightColor",
Method; adds a new color style to the StyleManager.
The following example registers "highlightColor" as a color style:
StyleManager.registerColorStyle("highlightColor");
StyleManager.registerInheritingSyle()
Usage StyleManager.registerInheritingStyle(propertyName) Parameters propertyName A string "newProp2", and so on). Returns
indicating the name of the style property (for example, "newProp1",
Method; marks this style property as inheriting. Use this method to register style properties that arent listed in the CSS specification. Do not use this method to change non-inheriting styles properties to inheriting.
The following example registers newProp1 as an inheriting style:
StyleManager.registerInheritingStyle("newProp1");
Slide class
TextArea component
The TextArea component wraps the native ActionScript TextField object. You can use styles to customize the TextArea component; when an instance is disabled its contents display in a color represented by the disabledColor style. A TextArea component can also be formatted with HTML, or as a password field that disguises the text.
A TextArea component can be enabled or disabled in an application. In the disabled state, it doesnt receive mouse or keyboard input. When enabled, it follows the same focus, selection, and navigation rules as an ActionScript TextField object. When a TextArea instance has focus, you can use the following keys to control it:
Key Arrow keys Page Down Page Up Shift + Tab Tab Description Moves the insertion point one line up, down, left, or right. Moves one screen down. Moves one screen up. Moves focus to the previous object. Moves focus to the next object.
Properties of the event object
Property type target Description A String indicating the name of the event. A reference to the component instance broadcasting the event.
UIObject
MovieClip > UIObject mx.core.UIObject
UIObject is the base class for all v2 components; it is not a visual component. The UIObject class wraps the ActionScript MovieClip object and contains functions and properties that allow Macromedia v2 components to share some common behavior. The UIObject class implements the following:
Styles Events Resize by scaling
To use the methods and properties of the UIObject, you call them directly from whichever component you are using. For example, to call the UIObject.setSize() method from the RadioButton component, you would write the following code:
myRadioButton.setSize(30, 30);
You only need to create an instance of UIObject if you are using the Macromedia Component V2 Architecture to create a new component. Even in that case, UIObject is often created implicitly by other subclasses like Button. If you do need to create an instance of UIObject, use the following code:
class MyComponent extends UIObject;
Method summary for the UIObject class
UIObject.createObject() UIObject.createClassObject() UIObject.destroyObject() UIObject.invalidate() UIObject.move() UIObject.redraw() UIObject.setSize() UIObject.setSkin()
Description Creates a subobject on an object. Creates an object on the specified class. Destroys a component instance. Marks the object so it will be redrawn on the next frame interval. Moves the object to the requested position. Forces validation of the object so it draws in the current frame. Resizes the object to the requested size. Sets a skin in the object.
Property summary for the UIObject class
UIObject.bottom
Description Returns the position of the bottom edge of the object relative to the bottom edge of its parent. The height of the object in pixels. The left position of the object in pixels. The position of the right edge of the object relative to the right edge of its parent. A number indicating the scaling factor in the x direction of the object relative to its parent. A number indicating the scaling factor in the y direction of the object relative to its parent. The position of the top edge of the object relative to its parent. A Boolean value indicating whether the object is visible (true) or not (false). The width of the object in pixels. The left position of the object in pixels. Returns the position of the top edge of the object relative to its parent.
UIObject.height UIObject.left UIObject.right
UIObject.scaleX
UIObject.scaleY
UIObject.top UIObject.visible
UIObject.width UIObject.x UIObject.y
Event summary for the UIObject class
UIObject.draw UIObject.load UIObject.move UIObject.resize UIObject.unload
Description Broadcast when an object is about to draw its graphics. Broadcast when subobjects are being created. Broadcast when the object has moved. Broadcast when the subobjects are being unloaded. Broadcast when the subobjects are being unloaded.
Window.title
Usage windowInstance.title
Property; a string indicating the caption of the title bar. The default value is "" (empty string).
The following code sets the title of the window to Hello World:
myTW.title = "Hello World";
Window.titleStyleDeclaration
Usage windowInstance.titleStyleDeclaration Description
Property; a string indicating the style declaration that formats the title bar of a window. The default value is undefined which indicates bold, white text.
The following code creates a window that displays the content of the movie clip with the linkage identifier ChangePassword and uses the CSSStyleDeclaration MyTWStyles:
var myTW = PopUpManager.createPopUp(_root, Window, true, {contentPath:"LoginForm", titleStyleDeclaration:"MyTWStyles"});
For more information about styles, see Using styles to customize component color and text on page 28.
XMLConnector component
XUpdateResolver component
A accessibility and components 14 authoring for 14 accordion component 48 adding components using ActionScript 20 alert component 48 B button component 48 button class 52 creating an application with 49 customizing 50 events 53 methods 53 parameters 49 properties 53 using 49 using skins with 51 using styles with 50 C categories containers 47 data 47 managers 47 screens 48 UI controls 46 cell renderer component 59 check box component 60 check box class 63 creating an application with 61 events 64 methods 63 parameters 61 properties 63 using 60
using skins with 62 using styles with 62 class style sheets 28 classes and component inheritance 13 button class 52 check box 63 combo box 72 focus manager 104 form class 109 label class 111 list class 118 loader 144 numeric stepper 157 progress bar component 168 radio button 182 screen 188 scroll bar 192 scroll pane component 202 slide 216 text area 220 text input 233 clickHandler 24 code hints, triggering 21 colors inheritance, tracking 214 setting style properties for 32 combo box component 67 combo box class 72 creating an application with 70 methods 73 parameters 69 properties 73 using 69 using skins with 71 using styles with 70 combo box events 74
compiled clips 14 in Library panel 16 working with 18 Component Inspector panel 16 component types accordion 48 alert component 48 button component 48 cell renderer 59 check box 60 combo box 67 containers 47 data 47 data grid 95 data holder 96 data provider 96 data set 96 databinding package 95 date chooser 96 label 109 list 114 loader 142 managers 47 media controller 153 media display 153 media playback 153 menu 153 numeric stepper 153 pop-up manager 162 progress bar 164 radio button 178 RDBMSResolver 188 remote procedure call 188 screen class 188 screens 48 scroll bar 188 scroll pane 199 slide class 216 style manager 214 text area 216 text input 229 UI controls 46 components adding dynamically 20 adding to Flash documents 18 architecture 12 available in Flash MX available in Flash MX Professional categories 46 categories, described 12
Technical specifications
Full description
This student text provides the activity guides for the projects outlined in the Digital Design Curriculum Guide: Foundations of Web Design (0-619-18396-9). The Digital Design Curriculum covers the professional Web design and development process using Macromedia Web tools and develops career skills in information technology for project management, design, research, communication, and technical concepts. This activities text can only be used in conjunction with the Design Curriculum Guide and should not be used as a standalone product.
Tags
CD-R5 Dopod 595 SGH-U600 EVO Amarys 320 SU-40NX1 SL400R K10ledvh Asmb-LE 37LF75 Perfection 1270 DMC-LS65 PGL985UC HP-70 PRA-1500 LS6113 Print CDX-MP200X CT-S620 CDX-GT620U BA400 Tagliasiepi Kompressor TDM-7582R RU-52SZ51D DMC-FS12 DCR-HC43E 32PW6322 CK-60 X-905 ICD-B40 Temporis Mini Sampler V2 LE40R89BD Audiocore SR-S2088C ACS45 1 SRP620-10 Wildfire TT 6234 Dtxtreme III Sagem D32V SMX-F400 HR-S6600 Indy Team Video Elna 945 Inspiron 710M Dimage X50 Mission 4 F100-112 Samsung J770 ESX39 STR-DA5200ES Century 1995 28PT4475 44644 Asus Cubx Imageclass D340 HDW250 Electronico Iq24 Pasadena CD71 Server 48 LI PS50C430a1 GT-C6620 DAS-202 373LM Modeler 680ZX Silvercrest SL65 Xpress 5 ADC5105 BV4250 Forerunner 205 AG-SW100 82999 DX460 Motorola V551 CD-5001F Nygk-G1500E12 Argos Ericsson W580 Review EWV401 Aquatimer Severn ZOB482X LH-W753TA LN32S81BD XB12-D0U VGC-VA1 DES-6500 XM-2252HX YST-SW40 Racing MP2008 PMC-05proiii Widl 106 AX-X1 SHU 4320 X 500
manuel d'instructions, Guide de l'utilisateur | Manual de instrucciones, Instrucciones de uso | Bedienungsanleitung, Bedienungsanleitung | Manual de Instruções, guia do usuário | инструкция | návod na použitie, Užívateľská príručka, návod k použití | bruksanvisningen | instrukcja, podręcznik użytkownika | kullanım kılavuzu, Kullanım | kézikönyv, használati útmutató | manuale di istruzioni, istruzioni d'uso | handleiding, gebruikershandleiding
Sitemap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101








1. Dreamweaver MX 2004 For Dummies
2. Advergaming Developer's Guide: Using Macromedia Flash MX 2004 and Macromedia Director MX (Game Development Series)
3. Macromedia Flash MX 2004 ActionScript Bible
4. Macromedia Director MX 2004 Bible
5. Macromedia Flash MX 2004 Hands On Training
6. Macromedia Flash MX 2004 Game Design Demystified