Macromedia Flash 8-flash Samples
|
|
Bookmark Macromedia Flash 8-flash Samples |
About Macromedia Flash 8-flash SamplesHere you can find all about Macromedia Flash 8-flash Samples like manual and other informations. For example: review.
Macromedia Flash 8-flash Samples manual (user guide) is ready to download for free.
On the bottom of page users can write a review. If you own a Macromedia Flash 8-flash Samples please write about it to help other people. [ Report abuse or wrong photo | Share your Macromedia Flash 8-flash Samples photo ]
Manual
Preview of first few manual pages (at low quality). Check before download. Click to enlarge.
Download
(English)Macromedia Flash 8-flash Samples, size: 416 KB |
Macromedia Flash 8-flash Samples
Video review
Adobe Flash Tools : Flash Tools: Example of Flash Web Site
User reviews and opinions
| punivss |
5:25pm on Tuesday, June 22nd, 2010 ![]() |
| Awesome game player, and has replaced my laptop but I do not have to need for business and so I do not know about how those work. Great for traveling,... | |
Comments posted on www.ps2netdrivers.net are solely the views and opinions of the people posting them and do not necessarily reflect the views or opinions of us.
Documents
Flash Samples
Trademarks 1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite, FlashPaper, Flash Video Encoder, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev, and WebHelp 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. 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, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without written approval from Macromedia, Inc. Notwithstanding the foregoing, the owner or authorized user of a valid copy of the software with which this manual was provided may print out one copy of this manual from an electronic version of this manual for the sole purpose of such owner or authorized user learning to use such software, provided that no part of this manual may be printed out, reproduced, distributed, resold, or transmitted for any other purposes, including, without limitation, commercial purposes, such as selling copies of this documentation or providing paid-for support services. Acknowledgments Project Management: Sheila McGinn Writing: Jay Armstrong, Jen deHaan Managing Editor: Rosana Francescato Lead Editor: Lisa Stanziano Editing: Evelyn Eldridge, Mark Nigara, Lisa Stanziano, Anne Szabla Production Management: Patrice ONeill, Kristin Conradi, Yuko Yagi Media Design and Production: Adam Barnett, Aaron Begley, Paul Benkman. John Francis, Geeta Karmarkar, Masayo Noda, Paul Rangel, Arena Reed, Mario Reynoso Special thanks to Jody Bleyle, Mary Burger, Lisa Friendly, Stephanie Gowin, Bonnie Loo, Mary Ann Walsh, Erick Vera, the beta testers, and the entire Flash and Flash Player engineering and QA teams. First Edition: September 2005 Macromedia, Inc. 601 Townsend St. San Francisco, CA 94103
Contents
Chapter 1: Graphics. 7 Animated drop shadow. 7 Animation and gradients. 8 Chapter 2: Accessibility.11 Accessibility features.11 Chapter 3: Masking. 13 Device font masking. 13 Scriptable masks. 14 Chapter 4: Text. 15 Text sample. 15 Multilingual content. 16 Chapter 5: Behaviors. 17 Photo scrapbook. 17 Chapter 6: Components. 19 Component application. 19 Dial component sample. 20 Login component sample. 20 Tip calculator. 21 Components jukebox. 22 Chapter 7: ActionScript. 23 Custom Flash Player context menu. Filters with ActionScript. Animation with ActionScript. The Tween class, the TransitionManager class, and progress bars. ActionScript data types. Bitmap caching with ActionScript. 26 26
Drawing with ActionScript. 27 ActionScript arrays example. 27 Interaction between the browser and Flash Player. 28 Stage size control with ActionScript. 28 Text loading with ActionScript. 29 Formatted text with ActionScript. 29 FlashType sample. 29 Login sample. 30 String processing with ActionScript. 30 Image manipulation with the BitmapData class. 31 Text field manipulation with ActionScript. 31 Photo gallery with tree navigation. 32 Photo gallery with thumbnails. 32 File upload with the FileReference API. 33 XML blog tracker. 33 XML language picker. 34 XML menu. 34 Chapter 8: Data Integration.35 News reader. 35 WebServiceConnector component. 36 Data integration XML sample. 36 Flash and PHP integration. 37 Chapter 9: Extending Flash.39 Shape command. 40 Get and set filters command. 40 PolyStar tool. 41 Trace Bitmap panel. 41 Sample DLL. 42 Chapter 10: Flash Lite.43 Two-way navigation sample. 43 Four-way navigation sample. 44 Input text field sample. 44 Movie clip menu sample. 45 Simple button menu sample. 45 Soft keys example. 45 Animated cartoon. 46 Flash Lite news reader. 46 Strategy game. 47
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Graphics\AnimatedDropShadow. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Graphics/ AnimatedDropShadow.
These samples were developed by Chris Georgenes.
Animation and gradients
This sample shows how to create a realistic-looking animation with gradients and drop shadows. To re-create the process of constructing this sample, you first design the eight-ball graphic. Start by mixing a radial gradient containing three colors: black, white, and a medium gray. Then create a circle with the Oval tool (hold down Shift to constrain the shape so it is perfectly round), and fill it with the new radial gradient. Using the Gradient Transform tool, edit the radial gradient fill by offsetting it from the center of the circle. This gives the illusion of depth as the off-center white highlight gradually changes to black and a subtle amount of gray appears in the lower-right corner of the sphere. This is crucial for making a convincing-looking sphere; it suggests light wrapping around from behind the ball. Then convert the gradient fill to a graphic symbol and edit it further by adding a new layer and applying a shadow using a linear gradient. The linear gradient uses two colors with varying amounts of alpha mixed in.
The next step is to create a movie clip symbol and place this eight-ball graphic inside it. Inside this movie clip is where the 8 graphic is added along with a mask layer. Then add a mask that is the same size and shape as the eight ball, and use the Free Transform tool and motion tweening to create the illusion of the ball rolling in various directions by moving and squashing the 8 graphic across the surface of the circle. The mask constrains the visibility of the 8 graphic to the exact area of the circle below it. This makes for a convincing illusion of the ball rolling. Then add animations of the ball rolling to a stop and starting from a stationary position. Use descriptive frame labels and simple frame actions so this movie clip can be targeted later with ActionScript from the main timeline. The movie clip has to be set up this way; it uses a drop shadow, which can be applied only to movie clip instances. Applying the drop shadow is the easiest part, thanks to the graphics filters in Flash. You simply select the movie clip instance, and from the Filters tab of the Property inspector, click the Plus (+) pop-up menu and select Drop Shadow. From there you can adjust the amount of blur, strength, quality, color, angle distance, and so on. The drop shadow filter is used to create blurs only when the eight ball is animated moving rapidly across the screen. This emphasizes the speed at which the ball is moving and creates a dynamic visual effect. You can find the sample source file, animation_and_gradients.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Graphics\AnimationAndGradients. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Graphics/ AnimationAndGradients.
This sample was developed by Chris Georgenes.
CHAPTER 2
Accessibility
An accessibility sample is provided when you install Macromedia Flash 8. This chapter contains a brief overview of this sample. This chapter contains the following section:
Accessibility features. 11
Accessibility features
This sample shows how to use accessibility features such as tab ordering, components, and the Accessibility panel. In this sample, you can see how to use the new authoring tool features and user interface, which are geared toward building applications that contain the accessibility features. An arrow moves to indicate which element on the Stage has the focus. Explore the source code to learn more about how to take advantage of the Flash accessibility features. You can find the sample source file, AccessibleApplications.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Accessibility\AccessibleApplications. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Accessibility/ AccessibleApplications.
CHAPTER 3
Masking
Masking samples are provided when you install Macromedia Flash 8. This chapter contains a brief overview of each sample. This chapter contains the following sections:
Device font masking. 13 Scriptable masks. 14
Device font masking
This sample explores Flash Player support for masking device fonts. The main features illustrated in the sample are device font masking, components, and scriptable masks. Newly added support in Flash Player for masking device fonts expands the possibilities for using scriptable masks on Flash content. Device font masking allows device fonts to be used inside components that mask their content, as well as custom masks that you create. This sample shows examples of both types of masking. You can find the sample source file, DeviceFontMasking.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Masking\DeviceFontMasking. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Masking/ DeviceFontMasking.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Text\TextEnhancements. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Text/ TextEnhancements.
Multilingual content
This sample, featuring the Strings panel, shows a streamlined approach to developing and managing content in several languages. The new Strings panel provides for easy and fast content development in different languages. Localized content for text fields inside the document is kept in language-specific XML files in directories alongside the document. This sample has content in several languages. The language displayed corresponds to the current language of the host operating system. Explore this sample to see how the Strings panel manages localized content. You can find the sample source file, MultiLingualContent.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Text\MultilingualContent. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Text/ MultilingualContent.
CHAPTER 5
Behaviors
A behaviors sample is provided when you install Macromedia Flash 8. This chapter contains a brief overview of this sample. This chapter contains the following section:
Photo scrapbook.17
Photo scrapbook
This sample shows how to build an interactive photo scrapbook by using behaviors instead of scripting. Behaviors provide an easy way to add interactivity to your Flash content without having to write ActionScript. In this sample, multiple behaviors are combined to create an interactive scrapbook. Explore the source file to learn more, or customize it by adding your own pictures. You can find the sample source file, BehaviorsScrapbook.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Behaviors\BehaviorsScrapbook. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Behaviors/ BehaviorsScrapbook.
CHAPTER 6
Components
Several component samples are provided when you install Macromedia Flash 8. This chapter contains a brief overview of each sample. This chapter contains the following sections:
Component application. 19 Dial component sample. 20 Login component sample. 20 Tip calculator. 21 Components jukebox. 22
Component application
This sample is the starter file you can use in the tutorial Creating an Application with Components (Flash Professional Only) in Using Components. The end result of the tutorial is a file identical to first_app.fla. You can find this starter Flash (FLA) file, first_app_start.fla, and the finished file, first_app.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Components\ ComponentsApplication. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Components/ ComponentsApplication.
Dial component sample
This sample provides an example of a dial component with a getter/setter property that gets or sets the position of the needle on the dial. This sample is discussed in Building your first component in Using Components. You can find the sample source file, Dial.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Components\DialComponent. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Components/ DialComponent.
Login component sample
The sample LogIn component files are the completed files created in the LogIn tutorial in Chapter 6, Creating Components in Using Components. This sample LogIn component demonstrates how to incorporate the power of Flash components into your own custom components using the version 2 Macromedia Component Architecture and ActionScript 2.0. This sample demonstrates how to create a form that captures and validates data, sends it to a server, and receives a response. You can bring Flash components into your own components by importing their uncompiled movie clip symbols from the library in StandardComponents.fla.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\language\Configuration\ComponentFLA\StandardComponents.fla. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Configuration/ComponentFLA/ StandardComponents.fla
The LogIn sample component uses Button, Label, and InputField component movie clip symbols to create a simple name and password login interface that dispatches a click event when the Login button is clicked. The sample includes a document file (.fla) containing the LogIn component movie clip symbol in its library and the LogIn components class ActionScript file (.as), which defines its class properties and methods. Explore both files to learn about the basic version 2 component structure and how to incorporate the capabilities of Flash components into your own custom components. You can find the sample source file, login.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\ Samples and Tutorials\Samples\Components\Login. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Components/ Login.
Tip calculator
This sample demonstrates how to perform event handling with forms and components. You can find the sample source files (TipCalculator.fla, TipCalculator1.fla, and TipCalculator2.fla) in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\ Samples and Tutorials\Samples\Components\TipCalculator. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Components/ TipCalculator.
Components jukebox
This sample demonstrates how to create a jukebox by using data types, general coding principles, and several components. You can find the sample source file, jukebox.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Components\Jukebox. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Components/ Jukebox.
CHAPTER 7
ActionScript
Several ActionScript samples are provided when you install Macromedia Flash 8. This chapter contains a brief overview of each sample. This chapter contains the following sections:
Custom Flash Player context menu. 24 Filters with ActionScript. 24 Animation with ActionScript. 25 The Tween class, the TransitionManager class, and progress bars. 25 ActionScript data types. 26 Bitmap caching with ActionScript. 26 Drawing with ActionScript. 27 ActionScript arrays example. 27 Interaction between the browser and Flash Player. 28 Stage size control with ActionScript. 28 Text loading with ActionScript. 29 Formatted text with ActionScript. 29 FlashType sample. 29 Login sample. 30 String processing with ActionScript. 30 Image manipulation with the BitmapData class.31 Text field manipulation with ActionScript.31 Photo gallery with tree navigation. 32 Photo gallery with thumbnails. 32 File upload with the FileReference API. 33 XML blog tracker. 33 XML language picker. 34 XML menu. 34
Custom Flash Player context menu
In this sample, you can see how to add custom options to the Flash Player context menu using ActionScript 2.0. This sample uses ActionScript to modify the context menu by adding cut, copy, and paste functionality that can be applied to the drawing objects on the Stage. The source includes the document file (.fla) and the ActionScript file (.as) that defines the ClipBoard class. Explore both files to learn more about the context menu and writing classes with ActionScript 2.0. You can find the sample source file, CustomizingContextMenu.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\ CustomizingContextMenu. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ CustomizingContextMenu.
Filters with ActionScript
This sample shows how to apply filter effects to images with ActionScript. You can apply different filters to several images, and then manipulate their properties at runtime. The ActionScript code shows how to apply filters and manipulate the filter properties using components. You can find the sample source file, Filters.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\Filters. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ Filters.
Animation with ActionScript
This sample provides an example of programmatic animation using ActionScript. It shows a simple game where instances are animated across the Stage at runtime. You create a custom mouse pointer, and you can tally scores by manipulating strings and using operators to write equations. You can find the sample source file, animation.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\Animation. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ Animation.
The Tween class, the TransitionManager class, and progress bars
This sample shows how to script animation using the Tween and TransitionManager classes, which provide an easy way to animate instances using code. It also shows how to create a progress bar using code. You can find the sample source file, tweenProgress.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\Tween ProgressBar. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ Tween ProgressBar.
ActionScript data types
This sample provides an example of converting data from one type to another. You can find the sample source file, datatypes.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\DataTypes. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ DataTypes.
Bitmap caching with ActionScript
This sample demonstrates the benefit of using bitmap caching when you animate complex vector shapes. Click the button on the Stage to see the vast improvement cacheAsBitmap has on the animating movie clips. You can find the sample source file, cacheBitmap.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\CacheBitmap. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ CacheBitmap.
Drawing with ActionScript
This sample demonstrates how to draw lines and create, fill, sort, and remove shapes with ActionScript. You can find the sample source file, drawingapi.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\DrawingAPI. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ DrawingAPI.
ActionScript arrays example
This sample illustrates array manipulation using ActionScript. The code in the sample creates an array and sorts, adds, and removes items of two List components. You can find the sample source file, array.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\Arrays. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ Arrays.
Interaction between the browser and Flash Player
This sample demonstrates how to use the External API (ExternalInterface class) to create interaction between the browser and your SWF file. In this sample, HTML form controls on a web page let you manipulate and display information about an FLV video that plays in a SWF file. Messages from the SWF file appear in an HTML text field. You can find the sample source file, external.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\Galleries. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ Galleries.
Photo gallery with thumbnails
This sample is a photo gallery application with thumbnails. It provides an example of using ActionScript to control movie clips dynamically. You can find the sample source file, gallery_tween.fla, in the Samples folder on your hard disk.
File upload with the FileReference API
This sample demonstrates how to let users select a file on their hard disk and upload it to a server. After the local image uploads, it appears in the SWF file. You can find the sample source file, FileUpload.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\FileUpload. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ FileUpload.
XML blog tracker
This sample demonstrates how to create a web log tracker by loading, parsing, and manipulating XML data. You can find the sample source file, xml_blogTracker.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\XML_BlogTracker. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ XML_BlogTracker.
XML language picker
This sample demonstrates how to use XML and nested arrays to choose strings of different languages to populate text fields. You can find the sample source file, xml_languagePicker.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\XML_LanguagePicker. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ XML_LanguagePicker.
XML menu
This sample demonstrates how to create a dynamic menu with XML data. The sample calls the ActionScript XmlMenu() constructor and passes it two parameters: the path to the XML menu file and a reference to the current timeline. The rest of the functionality resides in a custom class file, XmlMenu.as. You can find the sample source file, xmlmenu.fla, in the Samples folder on your hard disk.
On Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\XML_Menu. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ XML_Menu.
CHAPTER 8
Data Integration
Several data integration samples are provided when you install Macromedia Flash 8. This chapter contains a brief overview of each sample. If you installed Flash Basic 8, you can view and explore these samples. However, you can reconstruct the samples only if you installed Flash Professional 8. This chapter contains the following sections:
News reader. 35 WebServiceConnector component. 36 Data integration XML sample. 36 Flash and PHP integration. 37
News reader
This sample provides an interface for reading the latest news on Macromedia DevNet at www.macromedia.com/devnet. The addition of the data-binding user interface in Macromedia Flash Professional 8 allows you to build interfaces that connect to, retrieve, and display remote data without writing any code. The new components have built-in data awareness, allowing several possible scenarios with web services, XML documents, and more. Explore this sample to see how these components are connected to a Rich Site Summary (RSS) feed on www.macromedia.com.
You can find the sample source file, DevNetNews.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\DataIntegration\NewsReader. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/DataIntegration/ NewsReader.
WebServiceConnector component
This sample demonstrates how to use the WebServiceConnector component. You can find the sample source file, tips.fla, in the Samples folder on your hard disk.
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/ Macromedia Flash 8/Samples and Tutorials/Samples/DataIntegration/ MacromediaTips.
Data integration XML sample
This sample is an XML file that you can use in the Creating a simple application procedure in Using Flash. You can find the XML file (dinner_menu.xml) in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\DataIntegration\DinnerMenu. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/DataIntegration/ DinnerMenu.
Flash and PHP integration
This sample demonstrates how to use Flash and PHP (Hypertext Preprocessor) integration to create a guestbook. You can find the sample source file, guestbook.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\DataIntegration\Guestbook. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/DataIntegration/ Guestbook.
CHAPTER 9
Extending Flash
As a Macromedia Flash user, you may be familiar with ActionScript, which lets you create scripts that execute at runtime in Macromedia Flash Player. The Flash JavaScript application programming interface (JavaScript API) is a complementary programming tool that lets you create scripts that run in the authoring environment (that is, while a user has the Flash program open). These scripts can be used to help streamline the authoring process. For example, you can write scripts to automate repetitive tasks, add custom tools to the Tools panel, or add timeline effects. Several JavaScript API samples are available when you install Flash 8. This chapter contains a brief overview of each sample. This chapter contains the following sections:
Shape command. 40 Get and set filters command.40 PolyStar tool. 41 Trace Bitmap panel. 41 Sample DLL. 42
Shape command
This sample displays information about the contours of the selected shape in the Output panel. You can find the source file for this script, Shape.jsfl, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ExtendingFlash\Shape. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ExtendingFlash/ Shape.
For instructions on how to install and use this file, see Sample Shape command in Extending Flash.
Get and set filters command
This sample adds filters to a selected object and displays information about the filters in the Output panel. You can find the source file for this script, filtersGetSet.jsfl, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ExtendingFlash\filtersGetSet. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ExtendingFlash/ filtersGetSet.
For instructions on how to install and use this file, see Sample get and set filters command in Extending Flash.
PolyStar tool
This sample provides an example of adding a tool to the Tools panel using the JavaScript API. You can find the source file for this script, PolyStar.jsfl, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ExtendingFlash\PolyStar. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ExtendingFlash/ PolyStar.
For instructions on how to install and use this file, see Sample PolyStar tool in Extending Flash.
Trace Bitmap panel
This advanced sample illustrates how to design and build a panel to control the functions of Flash. You can find the sample source file, TraceBitmap.fla, in the Samples folder on your hard disk. This file shows the use of the MMExecute() function to call JavaScript commands from an ActionScript script.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ExtendingFlash\TraceBitmapPanel. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ExtendingFlash/ TraceBitmapPanel.
For information on installing and running the sample, see Sample Trace Bitmap panel in Extending Flash.
Sample DLL
Advanced users can use the C-level extensibility mechanism to implement Flash extensibility files using a combination of JavaScript and custom C code. You define functions using C, bundle them in a dynamic linked library (DLL) or a shared library, save the library in the appropriate directory, and then call the functions from JavaScript using the JavaScript API. A sample DLL implementation is located in the following folder:
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\ Samples and Tutorials\Samples\ExtendingFlash\ dllSampleComputeSum. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ExtendingFlash/ dllSampleComputeSum.
For information about installing and using this sample, see Sample DLL implementation in Chapter 3, C-Level Extensibility, in Extending Flash.
CHAPTER 10
Flash Lite
Several Macromedia Flash Lite samples are provided when you install Macromedia Flash 8. This chapter contains a brief overview of each sample. This chapter contains the following sections:
Two-way navigation sample. 43 Four-way navigation sample. 44 Input text field sample. 44 Movie clip menu sample. 45 Simple button menu sample. 45 Soft keys example. 45 Animated cartoon. 46 Flash Lite news reader. 46 Strategy game. 47
Two-way navigation sample
This sample demonstrates two-way navigation in Flash Lite. In two-way navigation, the devices Up and Down arrow keys switch focus among buttons and input text fields on the Stage, similar to how the Tab and Shift+Tab keys function on a desktop computer. For more information about two-way navigation, see Modes of tab navigation in Developing Flash Lite Applications.
You can find the sample source file, 2-way.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\FlashLite. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/FlashLite.
Four-way navigation sample
This sample demonstrates four-way navigation in Flash Lite. In four-way navigation, the devices Up, Down, Left, and Right arrow keys switch focus among buttons and input text fields on the Stage. For more information about four-way navigation, see Modes of tab navigation in Developing Flash Lite Applications. You can find the sample source file, 4-way.fla, in the Samples folder on your hard disk.
Input text field sample
This sample demonstrates how to use input text fields to get text input from users. For more information about how this sample was constructed, see Text field example application in Developing Flash Lite Applications. You can find the sample source file, input_text_example.fla, in the Samples folder on your hard disk.
Movie clip menu sample
This sample demonstrates how to create a simple menu out of movie clips. For more information about how this sample was constructed, see Creating a simple menu using movie clips in Developing Flash Lite Applications. You can find the sample source file, movieclip_menu_complete.fla, in the Samples folder on your hard disk.

Chapter 4: Basic Tasks: Creating a banner, Part 3.63 Examine the completed FLA file. 64 Considering your audience. 67 Checking your publish settings. 68 Inserting Flash on a Dreamweaver site.71 Using roundtrip editing. 73 Checking for Flash Player. 74 Test the application. 76 Summary. 77 Chapter 5: Basic Tasks: Create Accessible Flash Content. 79 Set up your workspace. 80 Make your document accessible to screen readers. 81 Provide a document title and description. 81 Provide a title and description for instances. 82 Specify that screen readers ignore elements in your document. 83 Change static text to dynamic text for accessibility. 83 Control the tab order and reading order. 84 About testing your document with screen readers. 87 Summary. 87 Chapter 6: Basic Tasks: Work with Layers.89 Set up your workspace. 90 Select a layer. 91 Hide and show layers. 92 Lock a layer. 92 Add and name a layer. 93 Change the order of layers. 93 Organize layers in a folder. 94 Add a mask layer. 94 Add a guide layer. 95 Delete a layer. 96 Summary. 96 Chapter 7: Basic Tasks: Create an Application. 97 Set up your workspace. 98 Copy input and dynamic text fields. 99 Name text fields. 99 Add and name a Button component. 100 Declare variables and values for the prices.101 Specify values for input text fields. 102
Write a function.103 Write an event handler for the component.104 Test your application.105 Summary.105 Chapter 8: Basic Tasks: Use Layout Tools. 107 Set up your workspace.108 Use guides to align an object.108 Change the Stage size.109 Resize objects to match the Stage size. 110 Specify snap alignment settings. 111 Align an object using the alignment guides. 111 Align objects using the Align panel. 112 Snap objects to each other. 113 Align objects using the Property inspector. 114 Align objects using the grid and arrow keys. 115 Summary. 115 Chapter 9: Basic Tasks: Create Symbols and Instances. 117 Set up your workspace. 118 About creating symbols. 118 Create a graphic symbol. 119 Duplicate and modify an instance of a symbol.120 Modify a symbol. 121 Create a movie clip symbol.122 Assign an instance name to the movie clip.122 Add an effect to the movie clip.123 Summary.123 Chapter 10: Basic Tasks: Add Button Animation and Navigation. 125 Set up your workspace.126 Create a button from grouped objects. 127 Name a button instance. 127 View the hit area by enabling buttons.128 Change the hit area of a button.128 Align buttons.129 Create animation for a button state.130 Add an action to a button. 131 Add navigation to a button.132 Test the SWF file.133 Summary.133
Chapter 11: Basic Tasks: Create a Presentation with Screens (Flash Professional Only). 135 Set up your workspace. 136 View the screen hierarchy and screen Timelines. 137 View screen properties. 138 Add content to a presentation slide. 139 Add screen navigation behaviors to buttons. 140 Add and name a slide.141 Select and move slides.141 Add content to a new slide. 142 Add transition behaviors. 142 Test your presentation. 143 Summary. 143 Chapter 12: Creating Graphics: Draw in Flash. 145 Select a shape tool. 146 Select options to create a polygon. 147 Draw a polygon. 147 Rotate the shape. 148 Use the cutout feature. 148 Transform the shape of your drawing. 149 Copy strokes. 149 Draw with the Line tool. 150 Select and add a different fill color. 150 Group the shape.151 Create a logo with the Pen tool.151 Summary. 152 Chapter 13: Creating Graphics: Create a Timeline Animation. 153 Create a motion tween. 155 Create a shape tween. 156 Copy and paste keyframes in an animation. 157 Change the speed of the animation. 158 Test the SWF file. 160 Summary. 160 Chapter 14: Creating Graphics: Making Animations with Easing (Flash Professional only). 161 Examine the completed FLA file. 163 Open the starter document. 165 Test the application. 176
Chapter 15: Creating Graphics: Applying Gradients. 177 Examine the completed FLA file. 179 Open the starter document. 181 Apply a linear gradient. 181 Create a radial gradient.183 Create a transform gradient with a shape.186 Apply the finishing touches. 187 Test the application. 191 Chapter 16: Creating Graphics: Apply Graphic Filters and Blends (Flash Professional Only). 193 Review your task.194 Open the starter document.195 Apply filters and blends.195 Chapter 17: Text: Add Text to a Document. 199 Set up your workspace. 200 Create an expanding-width text block.201 Create a fixed-width text block. 202 Edit text and change font attributes. 202 Select device fonts. 203 Add an input text field. 203 Copy a text field. 204 Assign instance names to text fields. 205 Create a dynamic text field. 205 Specify format options. 206 View ActionScript for the dynamic text field. 207 Test the SWF file. 207 Check spelling. 208 Summary. 208 Chapter 18: ActionScript: Use Script Assist mode. 209 Examine the completed FLA file. 211 Open the starter document.213 Add a script to a button by using Script Assist mode.213 Add frame scripts to the Timeline by using Script Assist mode.218 Add a frame script to the Title movie clip.221 Test the application. 223 Summary. 223
Chapter 19: ActionScript: Write Scripts. 225 Set up your workspace.226 Create an instance of a symbol.226 Name button instances.228 Initialize the document.228 Apply ActionScript syntax.229 Locate ActionScript reference documentation. 230 Add comments to ActionScript. 230 Write a function for a button. 231 Copy and modify a button function.232 Check syntax and test your application.233 Summary.234 Chapter 20: ActionScript: Add Interactivity. 235 Set up your workspace.236 Name button instances. 237 Add a scene. 237 Move between scenes.238 Control the document with a stop() action.238 Link a button to a scene.239 Add navigation to return to Scene 1.239 Play a movie clip. 240 Use a behavior to play an MP3 file.243 Test your document.243 Summary. 244 Chapter 21: ActionScript: Create a Form with Conditional Logic and Send Data. 245 Set up your workspace.246 Add an input text field to collect form data.246 Add a Submit button to the form.247 Add an error message.248 Add a confirmation message. 249 Add a stop() action. 249 Add frame labels for navigation. 250 Add conditional logic for the Submit button. 251 Pass data out of a SWF file.252 Write a function for the Try Again button.253 Test your SWF file.253 Summary. 254
Chapter 22: ActionScript: Work with Objects and Classes. 255 Set up your workspace. 256 Learn about classes and object types. 256 Create an object from a class. 257 Create a custom class. 259 Create two objects from the Product class. 262 Learn about extending existing classes. 263 Extend the MovieClip class to create a new class. 264 Summary. 266 Chapter 23: Data Integration: Overview (Flash Professional Only). 267 Chapter 24: Data Integration: Using the Macromedia Tips Web Service (Flash Professional Only). 269 Connect to a public web service. 270 Create a user interface and bind the components with the web service. 272 Chapter 25: Data Integration: Using XML for a Timesheet (Flash Professional Only). 277 Create the user interface. 278 Edit the data. 286 Chapter 26: Data Integration: Using XUpdate to Update the Timesheet (Flash Professional Only). 287 Update the timesheet. 288
Change the width and height of the rectangle, and then set the location of the rectangle to cover the Stage.
10. With 11.
the rectangle still selected on the Stage, press F8 to change the rectangle into a symbol. In the Convert to Symbol dialog box, type inv btn in the Name text box, select Button, and then click OK.
12. Double-click
the new button on the Stage to enter the Symbol-editing
mode. The rectangle is currently on the first Up frame of the button you created. This is the Up state of the buttonwhat users see when the button sits on the Stage. Instead, you want the button not to have anything visible on the Stage. Therefore, you need to move the rectangle to the Hit frame, which is the hit area of the button (the active region that a user can click to activate the button's actions).
Click the keyframe at the Up frame, and hold down the mouse button while you drag the keyframe to the Hit frame (see the following figure).
Drag the rectangle keyframe from the Up frame to the Hit frame on the Timeline. Now the entire area of the banner is clickable, but there is no visual appearance of the button on your banner.
14. Click
Scene 1 to return to the main Timeline.
Now there is a teal rectangle over the banner area. This refers to the invisible button's Hit area. If it's distracting to you, you can hide the button layer in the authoring environment.
15. 16.
(Optional) On the Timeline, click the dot that's under the Eye icon on the button layer to hide the contents of that layer. Select File > Save to save your progress before moving on. After you finish saving the file, proceed to the following exercise, Writing simple actions.
Writing simple actions
You need to add some simple ActionScript to your banner in order for the invisible button to open a website or send information about how many clicks the banner has received. There are several different places you can add ActionScript in a Flash document. You can select an instance, and add ActionScript that attaches directly to that instance. To access the code, you would need to find and select that instance again. You can also add ActionScript to a frame (or multiple frames) on the Timeline. It's a good idea to add all of your code to a single frame on the Timeline, because it's much easier to find, update, and organize when you're working on a file. Do not attach your ActionScript to instances.
You can also keep your ActionScript in external class files that import into the FLA file you're working on. This is sometimes the best way to organize your ActionScript, particularly when you work on larger projects. This topic goes beyond the scope of this tutorial.
12. Move
the slider to 60, and click Publish.
When you check the SWF file again, the file size is smaller. There are other ways to reduce the file size of a SWF file. If you need to design a file to a specific maximum file size, make sure you publish your work regularly and check the current file size. Bitmap images, sounds, and video quickly increase a SWF file's size. If you don't have Dreamweaver installed, then the tutorial series ends with this section. If you dont have Dreamweaver, you can return to the Publish Settings dialog box from this exercise, and make sure you select the HTML option under the Formats tab. When you publish the document, an HTML file exports with the SWF file. You can open this file, copy the HTML code, and paste it into your website. Notice that this file contains some extra tags that you won't need if you have an existing website, such as head and body tags. The tags you need are both the object and embed tags, which contains the information both Internet Explorer and Mozillabased browsers need to display the SWF file. If you have Dreamweaver installed, continue to the next page. In the following exercises, you place and edit the banner in a web page.
Inserting Flash on a Dreamweaver site
You might have a web page already created for a banner. We have created a page for you to use for the purposes of this exercise, which is ready to have a banner of this size placed on it. Make sure that you have the FlashBanner/Part3 directory available (see Open the finished project), and find the website folder inside this directory. Inside the website folder are the documents that you need to edit in Dreamweaver. You will modify the gnome.html web page in the following exercise.
You can find a finished version of the website in the finished folder in the FlashBanner/Part3 directory. 1.
Open the page called gnome.html in Dreamweaver MX 2004 or Dreamweaver 8 (this tutorial uses Dreamweaver 8). You can find this document in the website folder of this article's source files. Look inside the start folder (FlashBanner/Part3/website/start).
Save a copy of gnome.html in the same directory as the SWF file you published in the previous exercise (banner3.swf). Save a copy of rightnav.css in the same directory as the SWF file you published in the previous exercise. Look inside the start folder to find rightnav.css. This document adds styles (such as text color and margins) to the gnome.html file.
Create a button from grouped objects. 127 Name a button instance. 127 View the hit area by enabling buttons. 128 Change the hit area of a button. 128 Align buttons. 129 Create animation for a button state. 130 Add an action to a button.131 Add navigation to a button. 132 Test the SWF file. 133
If you are not familiar with symbols and instances, before taking this lesson select Help > How Do I > Basic Flash > Create Symbols and Instances to take that lesson.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Tutorial Assets\Basic Tasks\Add Button Animation and Navigation and double-click buttons_start.fla. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Tutorial Assets/Basic Tasks/Add Button Animation and Navigation and double-click buttons_start.fla.
The Add Button Animation and Navigation folder contains completed versions of the tutorial FLA files for your reference. 2. 3. 4. 5.
126 Basic Tasks: Add Button Animation and Navigation
Create a button from grouped objects
You can create buttons from text and graphics, including bitmap images and grouped objects. In this lesson, youll turn a logo and some text into one large button.
In the Tools panel, click the Selection tool. On the Stage, select the grouped text and logo, and then select Modify > Convert to Symbol. In the Convert to Symbol dialog box, name the symbol BTNLogo, and select Button as the behavior. In the Registration grid, verify that the square in the upper-left corner is selected as the registration point, and click OK. The registration point is the point from which the symbol aligns and rotates.
Name a button instance
As a best practice, you should name instances of symbols on the Stage. ActionScript relies on the instance name to identify the object.
With the button that you created still selected, open the Property inspector (Window > Properties). In the Instance Name text box, type logo_btn.
Name a button instance 127
View the hit area by enabling buttons
When the Enable Simple Buttons feature is active, you can view the less complex aspects of your buttons, such as the hit area (the clickable area of a button) and the colors used for the button states. More complex button design, such as animation, does not play.
Click in an empty space in the workspace to make sure you dont have any objects selected. Select Control > Enable Simple Buttons, and move the mouse pointer over different areas of the button that you created. The only areas of the button that are clickable (as indicated when the pointer changes to a hand) are the text area and the logo. The white space around the text and logo are not clickable.
Select Control > Enable Simple Buttons again to deselect the feature so that you can edit the button.
Next, youll redefine the hit area so that the button area covers the entire grouped area.
Change the hit area of a button
You can specify a hit area thats a different size from the default hit area by adding a keyframe to the Hit frame of the button symbol, and then drawing a shape that defines the hit area.
On the Stage, double-click the logo button that you created to view the button Timeline. The button Timeline contains the following states:
Up Over Down Hit
Double-click the Layer 1 name in the Timeline and rename the layer Hit Area.
128 Basic Tasks: Add Button Animation and Navigation
Select the Hit frame (Frame 4) of the Hit Area layer in the BTNLogo Timeline, and press F6 to add a keyframe. In the Tools panel, select the Rectangle tool. The stroke and fill color for the rectangle are unimportant. On the Stage, draw a rectangle that covers, as closely as possible, the logo and text.
The rectangle now defines the clickable area of the button.
5. 6. 7.
Click Scene 1, above the upper-left side of the Stage, to exit symbolediting mode for the button. Select Control > Enable Simple Buttons. On the Stage, again move the pointer over the text. The hit area changes to the shape of the rectangle that you drew. Select Control > Enable Simple Buttons to deselect that feature.
Align buttons
You can align buttons along horizontal and vertical axes using the Align panel.
In the Timeline, click the Content layer. Click Insert Layer below the Timeline. Double-click the layer name, type Animated Buttons as the new name for the layer, and press Enter (Windows) or Return (Macintosh). In the Library panel (Window > Library) select Button 1 and drag it to the lower-right edge of the Stage. Precise placement isnt necessary.
In the Instance Name text box in the Property inspector, give the button the instance name links_btn. Drag Button 2 and Button 3 from the Library panel, placing them to the left of Button 1. Use the approximate spacing shown in the following illustration:
Align buttons 129
Using the Selection tool, drag to select all three buttons. Open the Align panel by selecting Window > Align. Verify that To Stage is not selected, because you do not want to align the buttons relative to the Stage. In the Align panel, click Align Vertical Center, and then click Distribute Horizontal Center. The buttons align on the Stage. the Align panel.
10. Close 11.
On the Stage, click in an empty space in the workspace to make sure you dont have any objects selected, and select Button 2. In the Instance Name text box in the Property inspector, enter contact_btn. Select Button 3 and name it sweepstakes_btn.
Create animation for a button state
142 Basic Tasks: Create a Presentation with Screens (Flash Professional Only)
To add the Fly behavior, verify that the features slide is still selected. In the Behaviors panel, click Add (+) and select Screen > Transition from the menu. In the Transitions dialog box, select Fly from the list of transitions, and select Out as the direction. In the Duration text box, enter.5 as the length of time to complete the transition. In the Start Location pop-up menu, select Left Center and watch the transition preview, and then click OK. In the Behaviors panel, revealChild now appears twice. With the Fly behavior, however, you want to hide the child screen.
In the Behaviors panel, click the second event in the list, which is the one you just added. In the pop-up menu, select hideChild.
Test your presentation
Your presentation is now complete and ready to test.
Select Control > Test Movie. Use the Forward and Backward navigation buttons to move through the presentation and view the transitions.
Congratulations on learning how to create a slide presentation with screens. In a few minutes, you learned how to accomplish the following tasks:
Add content to a presentation slide. Add screen navigation to buttons. Add and name a slide. Select and move slides. Add content to a new slide. Add transition behaviors to a slide.
To learn more about using screens, see Working with Screens (Flash Professional Only) in Using Flash.
Summary 143
144 Basic Tasks: Create a Presentation with Screens (Flash Professional Only)
CHAPTER 12
Creating Graphics: Draw in Flash
When you draw in Flash, you create vector art, which is a mathematical representation of lines, curves, color, and position. Vector art is resolutionindependent; you can rescale the art to any size or display it at any resolution without losing clarity. Additionally, vector art downloads faster than comparable bitmap images. This tutorial shows you how to create vector art of a bolt and logo. You can print this tutorial by downloading a PDF version of it from the Macromedia Flash Documentation page at www.macromedia.com/go/ fl_documentation. In this tutorial, you will complete the following tasks:
Draw a polygon. 147 Rotate the shape. 148 Use the cutout feature. 148 Transform the shape of your drawing. 149 Copy strokes. 149 Draw with the Line tool. 150 Select and add a different fill color. 150 Group the shape.151 Create a logo with the Pen tool.151
Control-click (Windows) or Command-click (Macintosh) the flat part of the curve at the top of the graph near Frame 32 and drag the new point downward to approximately 76% along the vertical axis.
Dragging the point at Frame 32
Drag the vertex handles so that the line connecting them to the control point is horizontal and each handle is the same distance from the control point.
Dragging the vertex handles
Control-click (Windows) or Command-click (Macintosh) the curve at about Frame 44 and drag it up to the 100% line.
172 Creating Graphics: Making Animations with Easing (Flash Professional only)
Drag the vertex handles for the new control point onto the control point. (Windows) or Command-click (Macintosh) the curve at about Frame 52 and drag it down to about 95% on the vertical axis. Drag the vertex handles so that the line connecting them to the control point is horizontal and each handle is the same distance from the control point.
10. Control-click 11.
The completed Ease In / Ease Out curve You have now created a complex easing curve that represents a bouncing eight ball instead of a simple one-way motion tween. You can use the Play button in the Custom Ease In / Ease Out dialog box to preview your animation on the Stage while you experiment with the tween curve.
12. In 13.
the lower-left corner of the Custom Ease In / Ease Out dialog box, click Play. Review the live preview of your animation on the Stage. Click OK to close the dialog box. File > Save to save your FLA file.
Open the starter document 173
Create a motion tween with an alpha setting
In this section, you will create a tween of the alpha value of the shadow graphic that appears under the eight ball. Because the changes in the shadow should match the speed and timing of the bouncing eight ball, you will use the same easing curve you created in the previous section.
Create the tween of the alpha value for the shadow
1. 2. 3. 4. 5. 6. 7.
In the Timeline, select Frame 61 of the layer called Shadow. Select Insert > Timeline > Keyframe. Drag the playhead to Frame 1. Click outside the Stage to deselect all selections. Click the shadow movie clip on the Stage. In the Property inspector, select Alpha from the Color menu. Drag the Alpha slider down until the value is 25%. You have now set the alpha value to 25% in Frame 1 and 100% in Frame 61.
Rotating the gradient clockwise
Lock the Background layer in the Timeline to prevent further changes to this layer. File > Save to save your FLA file.
Create a radial gradient
Next, you will add a radial gradient to the black eight ball.
Double-click the black circle in the layer called Ball. This opens the group containing the eight-ball shape. Select the black circle shape. You will apply a gradient to this shape. Do not select the number 8 on the eight ball.
Create a radial gradient 183
In the Color Mixer panel select Radial from the Type pop-up menu. Select Mirror Overflow mode from the Overflow pop-up menu.
The correct Radial Type and Mirror Overflow settings
Double-click the left gradient color swatch and select the color black (#000000). Double-click the right gradient color swatch and type 002200 into the color text box. Press Enter. Drag the left gradient color swatch to the right about three-fourths of the way as shown in the following illustration. This makes the green part of the gradient appear only in the outer 25% of the ball shape.
Dragging a gradient color swatch
Select the Zoom tool from the Tools panel and click the circle shape to magnify it. Select the Gradient Transform tool in the Tools panel.
184 Creating Graphics: Applying Gradients
Rotate the radial gradient 90 clockwise by dragging the Gradient Rotate handle.
Dragging to rotate the gradient 90 clockwise.
the Focal Point control and drag it near the top of the circle.
Dragging the Focal Point control toward the top of the circle shape
Select the center control point and drag the entire gradient upward a short distance as shown in the following illustration. The mirrored overflow gradient is at the bottom of the circle.
Dragging the center control point upwards
12. Select 13.
the Selection tool in the Tools panel. the Stage area to deselect the eight-ball group.
Double-click the Zoom tool to return the Stage area to a view of 100%. Select File > Save to save your FLA file.
14. Double-click 15.
Create a radial gradient 185
Create a transform gradient with a shape
In this section, you will create a gradient and then use the Free Transform tool to change its shape.
Select the Shadow layer in the Timeline. Select the Oval tool in the Tools panel. Hold down Shift and then drag on the Stage with the Oval tool to draw a circle approximately 150 pixels square. This should be about the same diameter as the eight ball. In the Color Mixers Type menu, select Radial. Move the left gradient color swatch all the way to the left. You should have one swatch all the way to the left and one all the way to the right. Double-click the left swatch and select the color black (#000000) in the Color Picker. Double-click the right swatch to display the Color Picker. Select the color black (#000000). In the Color Picker, drag the Alpha slider down to zero. This creates a gradient from black to transparent, allowing the green background to show through the edge of the circle you just drew. the Gradient Transform tool from the Tools panel and drag the Focal Point control of the gradient back to the center of the circle. Select the Free Transform tool and scale the circle along the y (vertical) axis by dragging the top-center handle downward as shown in the following illustration.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Tutorial Assets\ActionScript\Add Interactivity and double-click interactivity_start.fla. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Tutorial Assets/ ActionScript/Add Interactivity and double-click interactivity_start.fla.
The Add Interactivity folder contains completed versions of the tutorial FLA files for your reference. 2.
N OT E 236 ActionScript: Add Interactivity
Select File > Save As and save the document with a new name, in the same folder, to preserve the original start file. As you complete this lesson, remember to save your work frequently. Select Window > Workspace Layout > Default to configure your workspace. In the Stage View pop-up menu, in the upper-right side of the Timeline, select Show Frame to view both the Stage and the workspace. Click in the workspace, away from objects on the Stage, so that no objects are selected.
Youll provide instance names for the buttons on the Stage so that you can refer to the instance names in ActionScript.
On the lower-right side of the Stage, select the button at the left. In the Property inspector (Window > Properties > Properties), type goScene_btn in the Instance Name text box to name the instance of the symbol.
Select the middle button and use the Property inspector to give the button an instance name of attachMovie_btn. Select the far-right button and use the Property inspector to give the button an instance name of playSound_btn.
Add a scene
You can use scenes in Flash to organize your document into discrete sections that can contain content exclusive of other scenes. Youll create and add content to a new scene.
Select Insert > Scene. You can no longer see Scene 1, and Scene 2 now appears above the Stage. The Stage is empty.
From the Library panel (Window > Library), drag the Animation movie clip to the Stage. With the movie clip selected, use the Property inspector to give the instance an x coordinate of 200 and a y coordinate of 15. Press Enter (Windows) or Return (Macintosh). The movie clip moves to the designated Stage coordinates.
Add a scene 237
Use the Property inspector to give the Animation movie clip an instance name of animation_mc. Rename Layer 1 Animation. Create a new layer and name it Buttons. Drag an instance of the BTNback symbol to the Stage, and place it anywhere to the right of the movie clip.
The Create a Form folder contains completed versions of the tutorial FLA files for your reference. 2. 3. 4.
246 ActionScript: Create a Form with Conditional Logic and Send Data
Select File > Save As and save the document with a new name, in the same folder, to preserve the original start file. Select Window > Workspace Layout > Default to set up your workspace for taking lessons. If necessary, drag the lower edge of the timeline (Window > Timeline) down to enlarge the timeline view.
Add an input text field to collect form data
Youll start by inserting a text field in your document in which viewers can enter data. You will also name the text field so you can later reference the text field as you use ActionScript in your Flash application.
Click in the workspace, away from objects on the Stage, so that no objects are selected. In the Tools panel, select the Text tool.
In the Property inspector, do the following to set text attributes:
Select Input Text from the Text Type pop-up menu. Select _sans from the Font pop-up menu. Enter 10 in the Font Size text box. Click the text color box and select a shade of dark blue. Verify that Align Left is selected. Verify that Single Line is selected in the Line Type pop-up menu.
In the Timeline, select Frame 1 of the Input Text layer. On the Stage, drag the Text tool to create an input text field to the right of the http:// text.
If necessary, use the Selection tool to drag the text field or use the arrows keys to adjust the position. With the input text field still selected, in the Property inspector, type url_txt in the Instance Name text box. Youll refer to the instance name later when you add ActionScript.
Add a Submit button to the form
The Library panel contains a Submit button symbol that you will add to the form.
From the Library panel (Window > Library), drag the Submit button to the Stage and place it over the SubmitURL guide.
Drag the button or use the arrows keys to adjust the position, if necessary. In the Property inspector, type submit_btn in the Instance Name text box.
Add a Submit button to the form 247
Add an error message
Youll add a message to display if the user clicks the Submit button before entering data.
In the Timeline, with the Branding layer selected, click Insert Layer and name the layer Dialog Boxes. Select Frame 5 of the Dialog Boxes layer. Right-click (Windows) or Control-click (Macintosh) the selected layer and select Insert Blank Keyframe from the context menu.
Create the user interface 279
The XMLConnector component stores information internally as strings. When a request is made for the data through a DataBinding component, you can define how the string data is converted into the correct ActionScript types. This is accomplished by selecting an item within the Schema Tree pane and modifying its settings. 7.
280 Data Integration: Using XML for a Timesheet (Flash Professional Only)
Select the Date schema field. Its type is set to String. This is because the Flash authoring tool cannot determine that it is a date type based on its value. You need to give Flash some additional information to encode this value correctly.
Select the Data Type parameter for the Date schema field and change it to Date. This tells the DataBinding component to try to work with this value as a date.
For more information on data binding and data types, see About handling data types in data binding (Flash Professional only) in Using Flash.
Select the encoder parameter for the Date schema field and change it to Date. Select the encoder options parameter and select the value MM/DD/YYYY. This tells the DataBinding component how the string value is represented in the XML file. With this information, the DataBinding component can successfully take any string in this format and convert it into an ActionScript date object.
Create the user interface 281
For more information on data binding and encoders, see Schema encoders in Using Flash (in Flash, select Help > Using Flash).
the @billable schema field.
The fields data type was automatically set to Boolean by the authoring tool, which looks for certain patterns to guess the type of an XML element. However, you need to modify the encoder options for the field. For Boolean data types, the encoder options specify strings that indicate true and false values.
With the @billable schema field still selected, double-click the Encoder Options field. the Boolean Encoder dialog box that appears, enter true in the Strings That Mean True text box and enter false in the Strings That Mean False text box.
12. In
Select the @duration schema field. The fields data type was automatically set to Integer. This is because the sample XML field contained only whole number values for this attribute.
14. Select the Data Type setting for the @duration schema field and change
it to Number so that it is not limited to integer values.
15. 16. 17. 18.
In the Component inspector, click the Bindings tab. Click the Add Binding button. In the Add Binding dialog box, select the row: Array item and click OK. In the Component inspector, select the Direction property and set it to Out. the Bound To property.
datapacket/row[@id=?id]
In the Component inspector, click the Bindings tab. Click the Add Binding button. In the Add Binding dialog box, click the deltaPacket property and click OK. Component inspector Bindings tab, double-click the Bound To property. In the Bound To dialog box, click the Data Set component, and then click the deltaPacket schema location and click OK. This binding will copy the DeltaPacket component to the XUpdateResolver component so that it can be manipulated before it is sent to the server.
10. In the 11.
The data is copied after the DataSet components applyUpdates() method is called. 12. Drag 13.
a TextArea component onto the Stage, and in the Property inspector enter the instance name deltaText. Still in the Property inspector, set the Width to 360. Bindings tab.
14. Select the component, and then in the Component inspector, click the 15.
Click the Add Binding button.
Update the timesheet 289
16. 17. 18.
In the Add Binding dialog box, click the text: String property and click OK. In the Bindings tab, double-click the Bound To property. In the Bound To dialog box, click the XUpdateResolver component, and then click the xupdatePacket schema location and click OK. The update packet contains the modified version of the DeltaPacket that will be sent to the server.
19. In the 20.In
Components panel, open the User Interface category and drag a Button component onto the Stage.
the Property inspector, enter the instance name btn_show. In the Component inspector, click the Parameters tab and change the label to Show Updates. the button selected, open the Actions panel (F9) and enter the following code:
on (click) { _parent.timeInfo_ds.applyUpdates(); }
21. With
22.Test the application (Control > Test Movie). Load the data and make a
change to one or more fields in multiple records.
23.Click 24.Try
Show Updates. Review the XML packet in the TextArea component.
You can copy the XML data into your favorite XML editor to make it easier to read.
setting the includeDeltaPacketInfo parameter of the XUpdateResolver component to true using the Component inspector.
290 Data Integration: Using XUpdate to Update the Timesheet (Flash Professional Only)
Additional information is added to the update packet. This information can be used by the server to uniquely identify this update operation. With this information, the server can generate a result packet that can be used by the XUpdateResolver component and the DataSet component to update the client data with changes from the server.
Tags
BDM 755S Cplus Cusl2CBP IC-H2 Plus Siemens C56 XR-10S VT4020G Lexmark X340 Lead3 Nokia 5180 GRQ3122-S ETR-10N Controller Headphone Imagemixer VCD 508 S CT250 Plus EWF1029 ML-2245 EB 291 RME700 KDL-46D3000 DVD-R100LB XRS 9645 4 44 WM1245A UN55B7000 DR5100 KX-R191 SCX-4725FN Roland RE-3 Servers PI 3620 ICD-B15 ME-50 30x S IS70 C Mity 2 CU-VD40 RM-V111T Pickup CGL413W SUB 800A Gigaset A110 KA198 LT245 PDP-R06FE HT-BD6200R ESF6126 SGH-X497 Espio Mini Review Fridge IP4500 S75628KG3 DSC-T2 TX-10 2028-307A MP 1600 RF-22192R V8160 MS-7302 CLP-320N KX-TCD150SP Zoom-nikkor Adventure S KE-42MR1 95-40 Mercenaries GR-DF420E J3-20 CY-TM200N PRO III WH3331 Machine I915G Classic LW-B0760CL AV-28WFT1 Patrolpickup EOS350 D MC560 RDC-7 1 BDM750 DEH-P4200UB SC-EH600 System PV-S660 Docuprint 100 Software DMC-FZ20EG Amplifier 32LG5030 Tekken 4 DCR-DVD101E Trooper Vodafone 541 15VL63 EX 800 With DSC
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. Sams Teach Yourself Macromedia Flash 8 in 24 Hours
2. Macromedia Flash Professional 8 Game Development
3. Creating a Web Site with Flash 8: Visual QuickProject Guide
4. Flash 8: Projects for Learning Animation and Interactivity (O Reilly Digital Studio)
5. ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application Developers
6. Macromedia Flash Professional 8 Hands On Training
