Macromedia Flash 8 - Using Flash
Macromedia Flash 8-using Flash, size: 7.0 MB
Macromedia Flash 8-using Flash Video Encoder
By Bob Berry, Jen deHaan, Peter DeHaan, David Jacowitz, Wade Pickett - Macromedia Press (2005) - Paperback - 1726 pages - ISBN 0321395395
Components are " packaged" pieces of the Flash user interface, data integration tools, and media player that form the building blocks for building rich internet applications. They encapsulate complex functionality to make Flash development easier and more efficient, by letting developers reuse, share, and customize code. This book describes how to work with components and their supporting classes. In "Using ActionScript Components with Macromedia Flash 8, " learn how to: - Se... Read more
[ Report abuse or wrong photo | Share your Macromedia Flash 8 - Using Flash photo ]
Shape tween Macromedia Flash 8 easy step by step tutorial
User reviews and opinions
|AndersF||2:06pm on Thursday, September 2nd, 2010|
|Bought the 16G WiFi for my wife. She enjoys playing games, surfing the web, reading books, reading email and catching up on her Soaps at ABC.com. 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,...|
|saradev||7:15pm on Wednesday, June 30th, 2010|
|Overpriced content consumption table. Very responsive touch screen, high res screen Content Consumption only. Not great value for money. No camera.|
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.
This part of Flash Help includes several step-by-step tutorials, designed to teach you the fundamentals of Flash. Macromedia recommends that you go through the lessons using the sample files provided. The path to the sample file is provided in each lesson. By completing these hands-on lessons, youll learn how to use Flash to add text, graphics, and animation to your Flash applications. Additionally, youll learn how easy it is to customize your Flash application by using ActionsScript and behaviors. The lessons are targeted toward beginners to intermediate-level Flash designers and developers who want to get up to speed quickly. Each lesson focuses on a specific Flash design feature or topic and takes approximately 1020 minutes to complete, depending on your experience. In these lessons, you learn how to create a Flash document, write ActionScript, work with video and video control behaviors, and add a Flash component.
This book is not a comprehensive manual detailing all the features of Macromedia Flash. For in-depth information about using Flash, from within the Flash application, select Flash Help (Help > Flash Help).
NO T E
Basic Tasks: Create a Document
Youre about to experience the power of Macromedia Flash Basic 8 and Macromedia Flash Professional 8. Youll see how, in a few minutes, you can create a compelling web experience that combines video, text, graphics, and media control behaviors. 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:
Take a tour of the user interface. 14 Select panel sets and arrange panels. 15 Change background and Stage size.17 Change your view of the Stage. 18 View the Library panel. 18 Add graphics to the Stage. 19 Add video. 19 View object properties. 20 Add video control behaviors. 20 Use the Movie Explorer to view the document structure. 22 Test the document. 23 Find help. 23
Before taking this lesson, we recommend that you read Getting Started with Flash, to learn about the Flash workspace. To access this guide, select Help > Getting Started with Flash.
Take a tour of the user interface
First, youll open the starting FLA file that youll use to complete this lesson. Each lesson includes one start file, and a finished file that demonstrates how the FLA file should appear upon completion of the lessons.
To open your start file, in Flash select File > Open and navigate to the file:
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Tutorial Assets\Basic Tasks\Create a Document and double-click document_start.fla. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Tutorial Assets/Basic Tasks/Create a Document and double-click document_start.fla.
In Part 1 of this tutorial, you will complete the following tasks:
Examine the completed FLA file. 27 Creating a new document.29 Changing document properties.30 Importing graphics. 33 Introducing layers and the timeline. 36 Test the application.40
The tutorial workflow includes the following tasks:
Examine the completed FLA file on page 27 lets you view the completed Flash document. Creating a new document on page 29 shows you how to create a FLA file that youll use to create the banner throughout the three parts of this tutorial. Changing document properties on page 30 shows you how to change the dimensions of your SWF file. Importing graphics on page 33 shows you how to import assets into your documents library. Introducing layers and the timeline on page 36 shows you how to create and manipulate layers in the main Timeline. Test the application on page 40 shows you how to export and test your documents SWF file, which lets you test your progress so far.
Examine the completed FLA file
As you examine the finished version of an application that youll create, youll also look at the Flash workspace. In this section, you will complete the following tasks:
Open the authoring document on page 163 Review the completed FLA file on page 28 Close the completed FLA file on page 28
In subsequent sections youll go through the steps to create the application yourself starting with a brand new FLA file.
Open the finished FLA file
Its helpful to analyze the completed authoring document, which is a FLA file, to see how the author designed the application. You should examine what kinds of scripts were used to add interactivity, and understand what you are going to create. The files for this tutorial are located in the Samples and Tutorials folder in the Flash installation folder. For many users, particularly in educational settings, this folder is read-only. Before proceeding with the tutorial, you should copy the entire FlashBanner tutorial folder to the writable location of your choice. On most computers, you will find the Flash Banner tutorial folder in the following locations:
In gnome.html, click inside the body tag (click between the "y" the closing angle bracket) and open the Behaviors panel in Dreamweaver (Window > Behaviors). Click Add (+) and select Check Plugin from the behaviors pop-up menu. Select Flash from the Plugin pop-up menu. Leave the If Found, Go To URL text box blank. This text box controls which page the visitor with the specified plug-in sees. Leaving the text box blank ensures that users stays on the same page if they have Flash Player installed.
2. 3. 4.
Type a URL into the Otherwise, Go To URL text box. Specify an alternative URL for visitors who don't have the Flash Player plug-in. Type noflash.html into the text box.
There is a noflash.html document for you with the source files, included in the sample files that accompany this tutorial; it's inside the finished folder. Either save this document in the same folder as the gnome.html document you're working on, or create your own file in this location. Ideally, you would create a custom web page for users without Flash Player.
Select the Always go to first URL if detection is not possible option. When selected, this option effectively means "assume that the visitor has the plug-in, unless the browser explicitly indicates that the plug-in is not present." Because you add an alternate ad for visitors without the plug-in, this option is preferable for this exercise. The following figure shows the selections you have made up to this point to add Flash Player detection.
Make these selections to add Flash Player detection in Dreamweaver using a behavior.
Click OK. When you finish, Dreamweaver adds the following code to the <body> tag:
<body id="container" onLoad="MM_checkPlugin('Shockwave Flash','','noflash.html',true);return document.MM_returnValue">
Save your changes to the document before you proceed to Test the application.
You can find the finished files in the FlashBanner/Part3 file directory, inside the finished folder.
You can also add Flash Player detection in Flash authoring if you aren't using Dreamweaver. Go to the Publish Settings dialog box (File > Publish Settings) and make sure that you select HTML in the Formats tab. Then select the HTML tab, and select the Detect Flash Version option. Click Settings next to the check box. You can set the target, content, and alternate pages in this dialog box.
Now you have a Flash banner, with graphics and animation, which also reacts to button clicks. You have completed your first interactive and animated Flash document, and then you inserted it into a website using Dreamweaver. Let's take a look at the banner in action, within a browser window.
Click the gnome.html document that you modified in the previous exercises to open the web page that contains your banner. A new browser window opens and display the gnome website. Click the banner to open the browser window from the web page.
Congratulations on creating accessible Flash content. In a few minutes, you learned how to accomplish the following tasks:
Specify that your document is accessible to screen readers Provide a document title and description Provide a title and description for document instances Specify that screen readers ignore elements in your document Change static text to dynamic text for accessibility Control the order in which users navigate with the Tab key Control the reading order with ActionScript
Macromedia maintains an extensive website devoted to accessibility. For more information about accessibility with Macromedia products, see the Macromedia accessibility website at www.macromedia.com/macromedia/ accessibility.
Basic Tasks: Work with Layers
In Macromedia Flash Basic 8 and Macromedia Flash Professional 8, layers are analogous to transparent sheets of acetate stacked on top of each other. In the areas of a layer that dont contain content, you can see through to content in the layers below. Layers assist you in organizing content in your document. For example, you can keep background art on one layer and navigational buttons on another. Additionally, you can create and edit objects on one layer without affecting objects on another layer. 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:
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
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Tutorial Assets\Basic Tasks\Work with Layers and double-click layers_start.fla. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Tutorial Assets/Basic Tasks/Work with Layers and double-click layers_start.fla.
The Work with Layers folder contains completed versions of the tutorial FLA files for your reference. 2. 3. 4. 5.
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. 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. If necessary, drag the lower edge of the Timeline (Window > Timeline) down to enlarge the Timeline view. You can also use the scroll bar to scroll through the layers.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Tutorial Assets\Basic Tasks\Create an Application and double-click calculator_start.fla. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Tutorial Assets/Basic Tasks/Create an Application and double-click calculator_start.fla.
The Create an Application folder contains completed versions of the tutorial FLA files for your reference. 2.
NO TE NO TE
Select Window > Workspace Layout > Default to set up your workspace for taking lessons. The form already includes an input text field in the QTY column and a dynamic text field in the Price column. Youll copy the text fields for the Shocks and Cover rows.
Copy input and dynamic text fields
Youll use input text fields to create a form.
Click the input text field where users enter the quantity of CD players. Press Alt and drag the copy of the field down to the Shocks QTY area.
Alt-click the input text field that you just dragged; then drag the new copy of the field to the Cover QTY area. Alt-click the dynamic text field for the CD players price; then drag the copy of the field to the Shocks price area. Alt-click the field that you just dragged; then drag the copy to the Cover price area.
Name text fields
Before you can specify values for the text fields in ActionScript, you first need to give each text field an instance name in the Property inspector. Appending the instance name with txt identifies the object as a text object.
Click the top input text field in the QTY column. In the Instance Name text box of the Property inspector (Window > Properties), type qty1_txt. Follow the previous procedure to name the middle and bottom input text fields qty2_txt and qty3_txt, respectively. Click the top dynamic text field in the Price column. In the Instance Name text box of the Property inspector, type price1_txt. Follow the previous procedure to name the middle and bottom text fields in the column price2_txt and price3_txt, respectively.
Add and name a Button component
Components are movie clips that offer an easy way of adding advanced functionality to your document without having to know advanced ActionScript. Youll use the Button component to create a Calculate button that totals prices. Because the component youre using is based onv ActionScript 2.0, you first need to configure your Publish Settings dialog box to ensure your Flash content plays as expected.
Select File > Publish Settings. On the Flash tab of the Publish Settings dialog box, select ActionScript 2.0 in the ActionScript Version pop-up menu, if its not already selected. In the Timeline, click the Components layer to select it. From the Components panel (Window > Components), drag the Button component to the Stage and place it over the Calculate guide. On the Parameters tab of the Property inspector, with the Button component selected, click the Button text on the Label row, and type Calculate. Then press Enter or Return. The text that you type in the Label text box is the text that appears on the component.
Although this lesson uses specific tools for particular types of objects (alignment guides to align text, for example), no strict rules exist about the best way to align a particular type of object. In your own projects, use whatever tools suit your needs.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Tutorial Assets\Basic Tasks\Use Layout Tools and double-click layout_tools_start.fla. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Tutorial Assets/Basic Tasks/Use Layout Tools and double-click layout_tools_start.fla.
The Use Layout Tools folder contains completed versions of the tutorial FLA files for your reference. 2. 3. 4. 5.
108 Basic Tasks: Use Layout Tools
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. 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.
Use guides to align an object
You can use rulers and guides to precisely position or align objects in your document. Youll add guides to help you center the block of text.
Select View > Rulers. A horizontal and vertical ruler appear above and to the left of the Stage. Click anywhere in the horizontal ruler and drag down until you reach the 250-pixel horizontal position. Click anywhere in the vertical ruler and drag left until you reach the 375-pixel vertical position.
Ensure that you have Snap to Guides turned on by selecting View > Snapping > Snap to Guides. In the Tools panel, click the Selection tool. On the Stage, click inside the upper-left corner of the blue text border and drag it to the intersection of the two guides.
A small circle appears in the upper-left corner of the text border when you drag near the corner of the text border. The circle indicates that snapping is engaged.
If you want to remove the guides, select View > Guides > Clear Guides.
Change the Stage size
The Stage size of your document is 750 x 500 pixels. Youll change the Stage size to 640 x 480, a common size that supports a wide variety of screen sizes and resolutions.
Creating Graphics: Making Animations with Easing (Flash Professional only)
This tutorial guides you through the process of using the tweening tools in Macromedia Flash Basic 8 and Macromedia Flash Professional 8. Tweening is the process of animating a graphic by setting starting and ending values for its properties and letting Flash calculate the values in between. The term tween comes from in between. A simple example of a tween would be to place a graphic at the top of the Stage and then add several frames to the Timeline and move the graphic to the bottom of the Stage in the last frame. By letting Flash fill in the position values for the frames in between, you can easily create a smooth animation of the graphic from the top of the Stage to the bottom. Flash Professional also lets you exercise fine control over how the tweened property values are calculated, so you can easily create more complex animations. By using the Custom Ease In / Ease Out window, you can control the speed at which the changes to properties are applied at the beginning, middle, and end of your animations. Careful use of this window can yield visually compelling results. This tutorial takes you through the process of creating an animation by tweening different properties of a graphic using the various tweening controls in the Flash authoring environment. After examining the completed animation, youll begin by opening a starter Flash document and end by publishing the document for web playback. The tutorial should take approximately 20 minutes to complete. Before you take this tutorial you should read Chapter 2, Flash Basics, in Getting Started with Flash.
In this tutorial, you will complete the following tasks:
Examine the completed FLA file. 163 Open the starter document. 165 Create a motion tween. 165 Use easing controls. 168 Create a motion tween with an alpha setting. 174 Test the application. 176
The tweening tutorial workflow includes the following tasks:
Examine the completed FLA file on page 163 allows you to look at the completed Flash file. In the process, you will become familiar with the construction of the animation example and what you will be building in this tutorial. Open the starter document on page 165 lets you begin the tutorial with a FLA file that has some graphics already created for you. You will apply animation effects to these graphics. Create a motion tween on page 165 shows you the steps needed to apply a typical motion tween. Use easing controls on page 168 shows you how to finely control how Flash calculates the motion of your animations. Create a motion tween with an alpha setting on page 174 shows you the steps needed to animate alpha transparency values.
The Color Mixer with the correct settings for the gradient on the highlight shape
12. With 13.
the highlight shape still selected, select the Gradient Transform tool from the Tools panel. Drag the Gradient Rotate control 90 counterclockwise.
Apply the finishing touches 189
the Gradient Scale control downward until it touches the top of the highlight shape.
The Gradient Scale control
Dragging the Gradient Scale control downward to touch the highlight shape
Select the Selection tool from the Tools panel. Double-click outside the Stage twice to deselect the highlight group. The finished Flash illustration looks like this:
Select File > Save to save your FLA file.
190 Creating Graphics: Applying Gradients
You have now successfully applied a variety of gradients in Flash and created an attractive and realistic-looking illustration. By using the gradient tools in Flash, you can create an infinite range of visually interesting graphics and effects.
192 Creating Graphics: Applying Gradients
Creating Graphics: Apply Graphic Filters and Blends (Flash Professional Only)
This tutorial guides you through the process of creating eye-catching graphic effects using some of the authoring features in Macromedia Flash Professional 8 (Filters are not available in Flash Basic). By using the graphic filters and blend modes available in Flash, you can transform ordinary graphic objects into much more visually compelling content. A graphic filter is a method that processes the pixels of a graphic object to produce a specific effect. For example, you can apply a blur filter to an object to make its edges appear softer, or you can apply a drop shadow filter to an object to make it appear with a shadow behind it. A blend mode is a method of making the colors of a graphic object interact with the colors of other graphic objects beneath it. For example, by using the Lighten blend mode, you can make the parts of an object appear lighter in color to varying degrees depending on the colors of the objects beneath it. If you have not already done so, Macromedia recommends that before you take this tutorial you read Chapter 2, Flash Basics, in Getting Started with Flash. 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:
Review your task. 194 Open the starter document. 195 Apply filters and blends. 195
Review your task
In this tutorial, you will add some graphics to the Stage and apply filters to them to create a realistic-looking image of a pool table with a narrow depth of field. The balls in the foreground and background will appear out of focus, as if seen through a camera.
Test the SWF file 207
Flash Basic 8 and Flash Professional 8 introduce new features that let you check spelling in most places where text occurs in your document, including text fields, layer names, and ActionScript strings. To check spelling, you first configure the Spelling Setup options, and then run the spell checker.
Select Text > Spelling Setup. Verify that Check Text Fields Content is selected, and that youve selected the appropriate dictionary. Select any other options, as desired. Then click OK. Select Text > Check Spelling and respond to the dialog boxes that the spell checker presents. When you finish checking spelling, save your document.
To check spelling in text in external files, use the spell-check feature associated with the application that you used to create the external file.
208 Text: Add Text to a Document
Congratulations on learning the basic ways in which to add text to your document. In a few minutes, you learned how to accomplish the following tasks:
Create an expanding-width text block. Create a fixed-width text block. Edit text and change font attributes. Select device fonts. Add an input text field. Copy a text field. Assign instance names to text fields. Create a dynamic text field. View ActionScript that links the text field to an external text file. Set up and check spelling.
To learn more about the great variety of options you have when adding text to your document, see Chapter 6, Working with Text, in Using Flash.
ActionScript: Use Script Assist mode
This tutorial guides you through using Script Assist mode in Macromedia Flash Basic 8 and Macromedia Flash Professional 8. Script Assist mode prompts you to enter the elements of a script, and helps you to add simple interactivity to your SWF file (a compressed version of a Flash.fla file with the.swf extension) or application more easily. Script Assist mode is ideal for users who either arent comfortable writing their own scripts, or who just appreciate the ease of use the tool provides. Used in conjunction with the Actions panel, Script Assist mode prompts you to select options and enter parameters. For example, instead of writing your own script, you can select a language element from the Actions toolbox (or the Add (+) command on the toolbar), drag it onto the Script pane, and then use Script Assist mode to help you complete the script. This tutorial guides you through the steps of using Script Assist mode to add interactivity to a Flash application. You will add ActionScript code to an object (a button) and to frames in the Timeline. This tutorial also demonstrates some best practices for adding scripts to your Flash document. After examining the completed Flash application, youll begin by opening a starter Flash document and end by testing the interactivity youve added to an application by using Script Assist mode. The tutorial should take approximately 20 minutes to complete. Before you take this tutorial, read Chapter 2, Flash Basics in Getting Started with Flash.
Initialize the document
Applications have an initial state that specifies how the content first appears to users. You initialize properties and variables in the first frame of a document. Youll specify that the map movie clip should not be visible when the SWF file first plays.
Select Frame 1 of the Actions layer. If the Actions panel isnt open, select Window > Actions. Actions - Frame appears at the top of the panel, which indicates that you selected a frame in which to apply ActionScript. Its a good practice to verify that youre attaching ActionScript to the intended frame or object. The Actions panel includes a Script pane, the blank text entry area, in which you can enter text directly; an Actions toolbox, which lets you select ActionScript to add to your script; and a Script navigator, which functions like the Movie Explorer.
Along the top of the Actions panel, click Insert Target path. In the Insert Target Path dialog box, verify that Relative, meaning relative path, is selected. From the hierarchical tree in the dialog box, select screen_mc. Click OK. A target path tells ActionScript the location of an object within the overall structure of a document. For more information about paths, see Using absolute and relative target paths in Using Flash.
228 ActionScript: Write Scripts
Click in the Script pane, at the end of the screen_mc text, and type a period (.). When you type the period, code hints appear for the movie clip, because you used the _mc suffix when naming the instance. Double-click _visible from the list of code hints, and type the following:
This line of code makes the screen_mc movie clip invisible on the Stage.
If code hints dont appear, you dont have code hints selected as a preference in the Actions panel. You can type _visible directly in the Script pane. You can also change your preferences by clicking the pop-up menu in the upper-right corner of the Actions panel. From the pop-up menu, select Preferences, and then select Code Hints on the ActionScript tab.
Throughout authoring, remember to save your document frequently.
Apply ActionScript syntax
Create a new scene. Write ActionScript to navigate between scenes. Write ActionScript to play an animated movie clip at runtime. Use a behavior to play an MP3 file.
244 ActionScript: Add Interactivity
ActionScript: Create a Form with Conditional Logic and Send Data
You can create a form with conditional logic that allows the SWF file to respond to user interaction and send the form data from the SWF file to an external source. This tutorial shows you how to create a simple form. Before taking this lesson, you should be familiar with writing functions and variables; to learn about these, select Help > Flash Tutorials > Basic Tasks: Create an Application. 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:
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
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Tutorial Assets\ActionScript\Create a Form and double-click simpleForm_start.fla. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Tutorial Assets/ ActionScript/Create a Form and double-click simpleForm_start.fla.
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.
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.
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.
282 Data Integration: Using XML for a Timesheet (Flash Professional Only)
the Bound To dialog box, click the Data Set component, and then select the dataProvider: Array schema location and click OK.
The DataBinding component copies each object within the row array into a new record (transfer object) within the DataSet component. It applies the settings you selected as the data is copied so that the DataSet component receives ActionScript Date, Boolean, and Number fields for the @date, @billable, and @duration attributes. Next, you will create fields for the DataSet component that match those in the XMLConnector component.
Double-click the encoder options property. When prompted for a value for the rowNodeKey property, type datapacket/row[@id='?id']. This property identifies which node within the XML file will be treated as a record within the data set. It also defines which element or attribute combination makes the row node unique, as well as the schema field within the DataSet component that will represent it. See Updates sent to an external data source in Using Flash (in Flash, select Help > Using Flash). In the sample XML file, the id attribute of the datapacket/row node is the unique identifier, and it will be mapped to the DataSet components ID schema field. This is defined with the following expression:
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:
Components are " packaged" pieces of the Flash user interface, data integration tools, and media player that form the building blocks for building rich internet applications. They encapsulate complex functionality to make Flash development easier and more efficient, by letting developers reuse, share, and customize code. This book describes how to work with components and their supporting classes. In "Using ActionScript Components with Macromedia Flash 8, " learn how to: - Set component properties and parameters - Write functions to handle component " events, " such as clicking, loading, and rollovers - Customize component appearance - Create your own components and distribute them to other developers and designers - Use supporting classes for managing component depth and focus, or to customize data, styles, transition effects, and Web services Includes the following books in the Macromedia online documentation: "- Using Components - Components Language Reference "Powerful development and design tools require thorough and authoritative technical advice and documentation. When it comes to Macromedia Flash, no one is more authoritative than Macromedia Development and writing teams. Now their official documentation is available to you in printed book form. As you work, keep this guide by your side for ready access to valuable information on using Flash. We' ve designed it so that it' s easy to annotate as you progress. " "
Review R70-A007 MV12AH Cypelec RX-207TN Grill LV220D Whkm-D20 TA-RW311 Zuma-2002 440 QEE TDX-01930B VGN-A417M FP567S MH-62 ZWF9570W S-DV77ST Junior 42MF230A-37B D6510 Desperados Gmrs1202CH Machine MS-7358 4 0 M3820 Eater Preparations The Dead Valve AVR 135 EW431F Mf 4461 Yamaha GW10 NV-GS30B ME-6B Azera 98130 AKS 825 Asus P4BM Dect1480 Professional VGN-FZ18E FTM-350 MY-X2 300XL TSO DS524 Reference Card HT-R667 TX-1000 CDX-GT20 CQM1H KX-TCD200PD PMR 512 Clutch XR-10S ICF-C390 Edition UN40C7000WF HDR-SR5E HL-4050CDN Sentra 2001 Charger H10515DCF Nokia N8 Humminbird 718 Summit HC TE-2000 Computer APO-extender-R 2X DSC-H20 Timex W-6 26C4000 CW-29M166V Hkts 2 DCR-TRV235E Digimax A40 XP 300 FEB30S7FCB Twist-252 IC-M700 CP730 Windstar-2002 M2500 MP620 Observer TT Catalog HR1364 CMT-HX30 XR-5790R S1730 Aurora 430 U-9010 DMC-LZ2EG WD-12490TP ICD-P620 Canoscan-lide 500F P2370HD Bt50QT-9 29STD CM600S
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
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