Reviews & Opinions
Independent and trusted. Read before buy Macromedia Flash 8-flash Tutorials!

Macromedia Flash 8-flash Tutorials


Bookmark
Macromedia Flash 8-flash Tutorials

Bookmark and Share

 

Macromedia Flash 8-flash TutorialsAbout Macromedia Flash 8-flash Tutorials
Here you can find all about Macromedia Flash 8-flash Tutorials like manual and other informations. For example: review.

Macromedia Flash 8-flash Tutorials 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 Tutorials please write about it to help other people.
[ Report abuse or wrong photo | Share your Macromedia Flash 8-flash Tutorials photo ]

 

 

Manual

Preview of first few manual pages (at low quality). Check before download. Click to enlarge.
Manual - 1 page  Manual - 2 page  Manual - 3 page 

Download (English)
Macromedia Flash 8-flash Tutorials, size: 3.1 MB

 

Macromedia Flash 8-flash Tutorials

 

 

User reviews and opinions

<== Click here to post a new opinion, comment, review, etc.

No opinions have been provided. Be the first and add a new opinion/review.

 

Documents

doc0

Select File > Import > Import to Library to import an image into the current document.
You'll see the Import dialog box (see the following figure), which enables you to browse to the file you want to import.
Browse to the folder on your hard disk that contains an image to import into your Flash document.
Navigate to the directory where you saved the tutorials source files, and locate the bitmap image saved in the FlashBanner/Part1 directory. Select the gnome.png image, and click Open (Windows) or Import (Macintosh). The image is imported into the document's library.
You can drag assets from the library onto the Stage several times if you want to see several instances of the artwork. Your file size doesn't increase if you use several instances on the Stage. The SWF file only stores the information of the original symbol or asset from the library, and treats each instance like a duplicate. 4.
Select Window > Library to open the Library panel. You'll see the image you just imported, gnome.png, in the document's library.
Select the imported image in the library and drag it onto the Stage. Don't worry about where you put the image on the Stage, because you'll set the coordinates for the image later. When you drag something onto the Stage, you will see it in the SWF file when the file plays.
Click the Selection tool, and select the instance on the Stage. If you look at the Property inspector you'll notice that you can modify the image's width and height, as well as the image's X and Y position on the Stage. When you select an object on the Stage, you can see and modify the current coordinates in the Property inspector (see the following figure).
The X and Y coordinates match the registration point, which is the upper left corner of this movie clip symbol.
Type 0 into the X text box, and type 0 into the Y text box. Typing these values in sets the X and Y coordinates both to 0, as shown in the following figure.
Set the X and Y coordinates using the Property inspector. Set the X and Y values to 0.
Setting new coordinates moves the upper-left corner of the image to the upper-left corner of the Stage. You can drag the bitmap image around the Stage using the Selection tool instead of changing coordinates in the Property inspector. Use the Property inspector when you need to set a specific position for an object, like you did in this step.

Create a motion tween between Frames 1 and 15 on the movie clips timeline.
You can also right-click (Windows) or option-click (Macintosh) the frame and select Create Motion Tween from the context menu instead. 13.
Select any frame between Frames 15 and 30, and then select Motion from the Tween pop-up menu in the Property inspector to create a second animation. scrub) the animation.
14. Click the playhead and drag it across the movie clip's timeline to test (or

N OT E NO T E

Select Control > Test Movie.
A quicker way to test your SWF file is to use keyboard shortcuts. Press Control + Enter (Windows) or Command + Return (Macintosh) to test the file
The test environment opens where you can see the animation. Notice how it loops, appearing to fade in and out because of the change in brightness. By default, the playhead returns to Frame 1 and replays the animation after it reaches the final frame on the Timeline. This means the animation loops repeatedly, unless you tell it to stop. You will find out how to do this below in the exercise called Writing simple actions.
Select File > Save to save your progress before moving on. After you finish saving the file, proceed to the following exercise, Creating a button.

Creating a button

When you create a banner, you need to let your user click anywhere in the banner area and open a new browser window. You can create buttons very easily in Flash. Your button can either have a graphic with rollover graphics, sounds, and even animations of their own. Or, you can create an invisible button. Invisible buttons are useful when you want to create "hot spots" on your website, or make the entire banner clickable without obscuring your graphics. In the following exercise, you'll add an invisible button over your banner graphics.
For more information on creating visible buttons with graphics and rollover effects, search creating buttons in the Flash Help panel (F1). 1. 2. 3. 4.
Click Scene 1 in the edit bar to make sure that youre on the main Stage. Select Insert > Timeline > Layer to create a new layer, and rename the new layer to button. Select the Rectangle tool in the Tools panel (the button's icon looks like a square). Find the Colors section of the Tools panel (see the following figure), and click the pencil icon to select the Stroke color control.
Select No Color, as shown in the following figure. Doing so disables the rectangle's outline.
Select No Color for the stroke color control.
Drag the mouse diagonally across the Stage to create a rectangle. The size of the rectangle does not matteryou'll resize it later using the Property inspector.

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 set up your workspace for taking lessons.
Make your document accessible to screen readers
Youll now specify that your document is accessible to screen readers, and provide a name and description of your document that a screen reader can read aloud.
With nothing selected on the Stage, select Window > Other Panels > Accessibility. In the Accessibility panel, verify that the following options are selected:

Make Movie Accessible is

selected by default and allows Flash Player to pass accessibility information to a screen reader.
allows Flash Player to pass accessibility information nested inside a movie clip to a screen reader. If this option is selected for the entire document, you can still hide child objects for individual movie clips.
Auto Label associates text next to another Stage object, such as an input text field, as a label or title for that element.
Make Child Objects Accessible
Provide a document title and description
In the Accessibility panel for the document, you can enter a name and description for your document for screen readers.
In the Name text box, enter Trio ZX2004. In the Description text box, enter Corporate website about the Trio ZX2004. Includes 6 navigation buttons, overview text, and an animated car.
Provide a title and description for instances
Now that youve provided information about the entire document, you can provide information about Stage objects included in the document.
Select the Trio Motor Company logo along the top of the Stage. In the Accessibility panel, enter Trio Motor Company in the Name text box. Do not enter anything in the Description text box. Not every instance needs a description, which is read with the title information. If the title name sufficiently describes the function of the object, you dont need to include a description.
With the Accessibility panel still open, select the Dealers button on the Stage. Information in the Accessibility panel changes to reflect Accessibility options for the selected object. In the Accessibility panel for the Dealers button, you do not need to provide a name in the Title text box, because the button includes a text label that the screen reader will read. If you did not want the screen reader to read the text in the button, you could deselect Auto Label when you set up accessibility for the document.
In the Description text box, enter Links to a web page with information about dealers nationwide.
The other buttons also include text, which the screen reader will read aloud; therefore, you do not need to provide a title. Since the title of the buttons is fairly self-explanatory, theres no need for you to include descriptions.

Click the upper-left corner of the nav graphic, and drag it so that a circular snap indicator appears. With the snap indicator visible, drag the upper-left corner of the nav bar and snap it into place against the lower-left corner of the blue banner.
Align objects using the Property inspector
The Property inspector lets you precisely align objects on the x and y Stage axes, from the registration point of the Stage object. The registration point is the point from which a symbol aligns or rotates. Youll use the Property inspector to align the logo.
In the Timeline, select the Top layer. From the Library panel (Window > Library), drag the logo to an empty area of the Stage.
In the Property inspector, with the logo still selected, enter 20 in the X text box and 8 in the Y text box. Press Enter (Windows) or Return (Macintosh). The logo moves to the new x and y Stage values.
You can view and change the registration point of an object in the Info panel (Window > Info). The black square in the grid represents the registration point. To change it, you click another square in the grid.
Align objects using the grid and arrow keys
You can use the grid to assist you in placing objects on the Stage.
Select View > Grid > Show Grid. The grid does not appear when you test or publish your document.
If you wanted to snap objects to the horizontal and vertical grid lines, you would also select Snap to Grid (View > Snapping > Snap to Grid). For this lesson, you wont snap objects to the grid. 2. 3.
On the Stage, select the title text you previously grouped together. Use the Up Arrow key on your keyboard to nudge the text until the first line in the title text is on a horizontal grid line. Be sure to leave space between the title text and the navigation bar.
You can also use the Left Arrow, Down Arrow, and Right Arrow keys to nudge objects on the Stage in the direction of the arrow.
Congratulations on using layout tools to create a user interface. In a few minutes, you learned how to accomplish the following tasks:
View the workspace rulers Use guides to align objects Change the Stage size Resize objects to match the Stage size Align an object using the alignment guides Snap objects to each other Align objects using the Property inspector Use the grid and arrow keys to align objects
For more information about design topics in Flash, take another lesson from the Basic Tasks series.

CHAPTER 9

Basic Tasks: Create Symbols and Instances
A symbol is a reusable object, and an instance is an occurrence of a symbol on the Stage. Repeatedly using instances does not increase the file size and is a good part of a strategy for keeping a document file size small. Symbols also simplify editing a document; when you edit a symbol, all instances of the symbol update to reflect the edits. Another benefit of symbols is that they allow you to create sophisticated interactivity. 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:

On the Stage, select the car. Press Alt and drag the car up to create another instance.
With the duplicate selected, select Tint from the Color pop-up menu in the Property inspector. In the RGB area, enter 0 in the Red Color pop-up menu, 0 in the Green Color pop-up menu, and 255 in the Blue Color pop-up menu. Then press Enter (Windows) or Return (Macintosh). The duplicate instance turns blue, but the original instance remains unchanged.
120 Basic Tasks: Create Symbols and Instances

Modify a symbol

You can enter symbol-editing mode by double-clicking any instance of a symbol. Changes that you make in symbol-editing mode affect all instances of the symbol.
Do one of the following to enter symbol-editing mode:
On the Stage, double-click one of the car instances. In the Library panel, double-click the CarGraphic symbol.
Next to Scene 1 toward the top of the workspace, the name of the symbol appears, which indicates that youre in symbol-editing mode for the named symbol.
In the Tools panel, select the Free Transform tool and drag around the bottom car to select the entire car. In symbol-editing mode, the car is a graphic, within a symbol, that you can manipulate as you would any other vector graphic.
Drag the middle-right sizing handle of the Free Transform tool slightly to the right to stretch the symbol.
Click Scene 1, above the Timeline, to exit symbol-editing mode. Both instances of the symbol reflect the transformation.
Create a movie clip symbol
A movie clip symbol is analogous in many ways to a document within a document. This symbol type has its own Timeline independent of the main Timeline. You can add movie clips within other movie clips and buttons to create nested movie clips. You can also use the Property inspector to assign an instance name to an instance of a movie clip, and then reference the instance name in ActionScript. Youll convert the tire on the Stage into a movie clip.
With the Selection tool, click the tire on the Stage to select it and select Modify > Convert to Symbol. In the Convert to Symbol dialog box, enter MCWheel as the name, and select MovieClip as the behavior. In the Registration grid, this time select the center square as the registration point, so the center of the movie clip becomes the axis around which the symbol rotates. Click OK. The image on the Stage is now an instance of the MCWheel symbol in the library.
Assign an instance name to the movie clip
To refer to an instance in ActionScript, and as a general best practice, always assign instance names to buttons and movie clip symbols. (You cannot assign an instance name to a graphic symbol.)

Copy and paste keyframes in an animation
For the tire to look realistic as it bounces, it should compress slightly on each bounce. You can create this effect by transforming the shape of the tire in Frame 1 of the animation, and copying that frame in Frame 30.
With the Selection tool, select Frame 1 of the TireAnim layer. Then press F6 to add a keyframe. A new keyframe is added and the playhead moves to Frame 2. Select Frame 1 of the TireAnim layer again. In the Tools panel, select the Free Transform tool. The tire is selected, and transform handles appear around it.
Copy and paste keyframes in an animation 157
Select the transformation center point (the small circle near the center of the movie clip) and drag it to the bottom of the tire. The center point snaps to the lower-middle transform handle. On the Stage, drag the upper-middle transform handle down to slightly compress the tire shape. If necessary, drag the tire to align it over the shadow. To view the positioning, drag the playhead over Frames 1 and 2.

Save your file.

Always save your document before attempting to manipulate tweens, including copying, cutting, and pasting frames. If you make an error, you can revert to your saved document. 7. 8. 9.
Right-click (Windows) or Control-click (Macintosh) Frame 1 of the TireAnim layer and select Copy Frames from the context menu. Select Frame 29 of the TireAnim layer and press F6 to insert a keyframe. In Frame 30 of the TireAnim layer, right-click (Windows) or Controlclick (Macintosh) and select Paste Frames from the context menu. Control > Test Movie to view the animation. Close the SWF file window to return to the authoring environment.
Change the speed of the animation
When you tested the animation, you might have noticed that the tire bounces rather slowly. You can change the speed of an animation by changing the number of frames that play per second, and by setting positive and negative easing values, which determine the rate of acceleration and deceleration.
158 Creating Graphics: Create a Timeline Animation
Change the frames per second speed
The frame rate, measured in frames per second (fps) is the speed at which the animation plays. By default, Flash animations play at a rate of 12 fps, which is ideal for web animation. Sometimes, however, its desirable to change the fps rate. Youll now change the frame rate to 36 frames per second, which will make the tire appear to bounce more rapidly.
Click the Stage, away from any objects. In the Property inspector, type 36 in the Frame Rate text box. The frame rate applies to the entire Flash document, not just to an animation within the document.

The completed FLA file To see the completed FLA file (Filters&Blends_finished.fla), browse to one of the following locations:
In Windows: Hard Disk\Program Files\Macromedia\Flash 8\Samples and Tutorials\Tutorial Assets\Creating Graphics\Filters and Blends On the Macintosh: Hard Disk/Applications/Macromedia Flash 8/ Samples and Tutorials/Tutorial Assets/Creating Graphics/Filters and Blends
194 Creating Graphics: Apply Graphic Filters and Blends (Flash Professional Only)
Now that you have seen the document you will create, it is time to create your own version of the document. The first thing to do is open the starter document, which contains the graphic objects you will use with the filter and blend features of Flash.
In Flash, select File > Open. Browse to one of the following locations:
Select the file named Filters&Blends_start.fla and click Open.
As you complete the tutorial, remember to save your work frequently.

Apply filters and blends

In the following sections, you will apply blends and filters to the 9ball and CueBall movie clips found in the Library panel.
Apply a blend to the 9ball movie clip
The first task you must perform in the starter file is to apply a blend effect to an instance of the 9ball outlines movie clip to make its colors combine with the colors of the 9ball movie clip. This achieves a realistic shiny pool ball look.
Open the Library panel (Window > Library). Drag the 9ball movie clip from the Library panel to the lower-right corner of the Stage. This creates an new instance of the 9ball movie clip on the Stage. Double-click the new 9ball instance to enter symbol-editing mode.
Apply filters and blends 195
Drag the 9ball outlines movie clip from the Library panel onto the Stage so that it perfectly covers the 9ball instance. You can use the Arrow keys to make fine adjustments to the placement of the 9ball outlines instance.
With the 9ball outlines instance still selected, go to the Property inspector and select Multiply from the Blend menu. Double-click outside the Stage to exit symbol-editing mode. The 9ball instance should still be selected on the Stage. Open the Transform panel (Window > Transform). In the Transform panel, click the Constrain check box. Double-click the Width text box and enter 140. the Stage.

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.
Use the Property inspector to give the button an instance name of back_btn.

Move between scenes

You can move between scenes in the authoring environment by selecting a scene in the Scene panel.
To open the Scene panel, select Window > Other Panels > Scene. Select Scene 1.
Control the document with a stop() action
When you test or publish a Flash document that contains more than one scene, by default the scenes play linearly, in the order in which they appear in the Scenes panel. Youll use a stop() action for Scene 1 so that the playhead in the Timeline stops at Frame 1 of Scene 1.
In the main Timeline for Scene 1, add a new layer and name it Actions. Click Frame 1 of the Actions layer. In the Script pane of the Actions panel (Window > Actions), type the following comment followed by the script that stops the playhead on the frame:
// Stops the playhead at Frame 1. stop();
238 ActionScript: Add Interactivity

Link a button to a scene

Now that the playhead stops at Frame 1, youll add ActionScript that takes the user to Scene 2 upon releasing the goScene_btn instance.
Press Enter (Windows) or Return (Macintosh) twice and type the following comment. Then write the function that takes users to Scene 2 upon release of the goScene_btn instance:
// This script takes the user to Scene 2 when goScene_btn // is released. goScene_btn.onRelease = function (){ gotoAndStop("Scene 2", 1); };
In the script that you just typed, you used the onRelease() method for the button object. The gotoAndStop() function is a timeline control function that lets you specify the scene and frame number. In this case, you specified Frame 1.
Add navigation to return to Scene 1
The function that youll add to the button in Scene 2, to return the user to Scene 1, is similar to the function that you wrote to take the user to Scene 2.

setID(id); setProdName(prodName); setDescription(description);
Surround the class keyword with the constructor function. Declare each variable used in the class:
class { var var var Product id:Number; prodName:String; description:String
function Product (id:Number, prodName:String, description:String) { setID(id); setProdName(prodName); setDescription(description); } } 5.
Define getter and setter methods for each property of the class, as in the following example. Specify Void as the return type for the setter methods, and indicate the data type returned for the getter methods.
class Product { var id:Number; var prodName:String; var description:String
Create a custom class 261
function Product (id:Number, prodName:String, description:String) { setID(id); setProdName(prodName); setDescription(description); } public function setID (id:Number) :Void { this.id = id; } public function setProdName (prodName:String) :Void { this.prodName = prodName; } public function setDescription (description:String) :Void { this.description = description; } public function getID () :Number { return id; } public function getProdName () :String { return prodName } public function getDescription () :String { return description; } } 6.
A finished sample file of the file you just created, named Product.as, is located in your finished files folder. For the path, see Set up your workspace on page 256.
Create two objects from the Product class
Youll create a new FLA file, and then create two objects from the Product class.
Open a new Flash document and save it in the same location where you saved Product.as. In the new document, select Frame 1 in the Timeline.
262 ActionScript: Work with Objects and Classes
In the Actions panel, create two objects from the Product class using the data shown in the following table (the ActionScript that youll create appears after the table).

pedals

id prodName description 0 Clipless Pedals Excellent cleat engagement 1 ATB Available in comfort and aero design

handleBars

id prodName description
Verify that you created the objects as follows:
var handleBars:Product = new Product (1, "ATB", "Available in comfort and aero design"); var pedals:Product=new Product(0,"Clipless Pedals","Excellent cleat engagement");
Trace the description property of pedals:
trace (pedals.getDescription ());
Save and test the document. You should see the description of pedals in the Output panel.
A finished sample file of the document you just created, named handson2.fla, is located in your finished files folder. For the path, see Set up your workspace on page 256.
Learn about extending existing classes
The extends keyword in ActionScript 2.0 allows you to use all the methods and properties of an existing class in a new class. For example, if you wanted to define a class called Drag that inherited everything from the MovieClip class, you could use the following:

Connect to a public web service.270 Create a user interface and bind the components with the web service.272
This tutorial uses a public web service and therefore requires that you have an Internet connection. If you have trouble downloading or decompressing the files, see TechNote 13686 at www.macromedia.com/support/general/ts/documents/ downfiles.htm.
The use of a public web service in this tutorial does not imply that you should use one for real-world applications. In fact, Macromedia does not recommend using public web services directly from within any client-side application. For more information, see About data connectivity and security in Flash Player in the Data Integration chapter in Using Flash (in Flash, select Help > Using Flash). In a production environment, you should use web services that are placed on your own web server.
The finished FLA file for this tutorial is installed with Flash. The following list provides the typical paths to this directory.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Tutorial Assets\Data Integration\Tips On the Macintosh: browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Tutorial Assets/Data Integration/Tips
Connect to a public web service
Define a web service in Flash that will connect to a public web service.
Create a new Flash document using Flash Professional 8. Make sure your computer is connected to the Internet. Open the Web Services panel (Window > Other Panels > Web Services), and click Define Web Services. In the Define Web Services dialog box that appears, click Add Web Service (+), and then click the highlighted line to edit it. Enter the URL http://www.flash-mx.com/mm/tips/tips.cfc?WSDL and click OK.
In the Web Services panel, inspect the methods, parameters, and results of the Macromedia Tips web service.
270 Data Integration: Using the Macromedia Tips Web Service (Flash Professional Only)
The web service has one method, called getTipByProduct(). This method accepts a single parameter called product. The parameter is a string that tells the web service what Macromedia product you want to see a tip for. In the next step, you bind this parameter with a ComboBox instance in your application.
Right-click the getTipByProduct() method, and select Add Method Call from the context menu.
An instance of the WebServiceConnector component is added to the Stage.
In the Property inspector, enter the instance name tips_wsc. The component is now configured and on the Stage. You can place the component anywhere on or off the Stageit is invisible when you run the application.

Create the user interface.278 Edit the data. 286
This tutorial uses a public web service and therefore requires that you have an Internet connection. In addition, the tutorial wont work in a browser because of sandbox restrictions, but will work in the Flash authoring environment or the stand-alone Flash Player.
The use of a public web service in this tutorial does not imply that you should use one for real-world applications. In fact, Macromedia does not recommend using public web services directly from within any client-side application. For more information, see About data connectivity and security in Flash Player in Using Flash.
For this tutorial, you will need to the data.xml file provided in the Tutorial Assets folder. This file can be found in one of the following locations:
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Tutorial Assets\Data Integration\Using XML for a Timesheet\data.xml On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Tutorial Assets/Data Integration/Using XML for a Timesheet/data.xml
For demonstration purposes, you will access the XML data from your hard disk and display the DeltaPacket property within your screen. In the real world, the XUpdate would be sent to the server for processing.
278 Data Integration: Using XML for a Timesheet (Flash Professional Only)
Create the user interface
You will begin by creating a user interface, which displays the information in the XML file.
Add XMLConnector and DataSet Components
First you will add the components that will manage the data.
Create a new Flash document using Flash Professional 8. Make sure your computer is connected to the Internet. From the Components panel, open the Data category and drag an XMLConnector component on the Stage. In the Property inspector, enter the instance name timeInfo_con.
In the Component inspector or the Property inspector, click the Parameters tab. For the URL parameter, enter data.xml, and for the Direction parameter, select Receive from the pop-up menu. From the Components panel, drag a DataSet component on the Stage. In the Property inspector, enter the instance name timeInfo_ds. On the Stage, select the XMLConnector component. In the Component inspector, click the Schema tab. Select the results:XML property, and then click Import a Schema from a Sample XML File on the upper-right side of the Schema tab.
Alternatively, you can select Import XML Schema from the Component inspector title bar menu. 6.
Browse to where you saved the data.xml file, and select the file. The Schema tab now shows the structure of the data in the file. The row node is mapped to an ActionScript array of anonymous objects, because it repeats several times within the XML file. Any subnodes or attributes directly under the row node are considered properties of the anonymous objects contained within the array. For more information about how Flash translates XML documents into an internal schema representation, see Data Integration (Flash Professional Only) in Using Flash.

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.

Update the timesheet.288

This tutorial uses a public web service and therefore requires that you have an Internet connection. In addition, the tutorial wont work in a browser because of sandbox restrictions, but will work in the Flash authoring environment or Flash Player.
288 Data Integration: Using XUpdate to Update the Timesheet (Flash Professional Only)

Update the timesheet

Now you will set up the bindings to allow the timesheet to be updated.
Begin with the file you created in the Data Integration: Using XML for a Timesheet (Flash Professional Only) tutorial. In the Components panel, open the Data category and drag an XUpdateResolver component to the Stage. In the Property inspector, enter the instance name timeInfo_rs. Click the Schema tab in the Component inspector, and select the deltaPacket component property within the Schema Tree pane. Change the DeltaPacket components encoder setting to DataSetDeltaToXUpdateDelta. This encoder converts data within the DeltaPacket into XPath statements that are supplied to the XUpdateResolver component, but it needs additional information from you to do its job.
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:

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.

doc1

If the Property inspector isnt open, choose Window > Properties. In the Property inspector, verify that 12 is the number in the Frame Rate text box. The movie will play at 12 frames per second, an optimal frame rate for playing animations on the Web.
Note: If the Property inspector is not fully expanded, click the white triangle in lower right corner.
The Background Color box indicates the color of the Stage. Click the down arrow on the Background Color box, then move the Eyedropper tool over the color swatches to view their hexadecimal values in the Hexadecimal text box. Find and click the gray color swatch with the hexadecimal value of 999999.

Hexadecimal text box

Select this shade of gray
To resize the Stage, click the Size button, which indicates the size of the Stage. In the Document Properties dialog box, type 640 px in the first Dimensions text box and 290 px in the second Dimensions text box. Verify that Pixels is selected in the pop-up menu, and click OK.
The Stage dimensions change to reflect the new settings of 640 x 290 pixels. Specify grid settings On the Stage, you can align objects along horizontal and vertical grid lines. Even when the grid is not visible, you can snap objects to it. Now youll modify the distance between the horizontal and vertical grid lines, and create a grid in alignment with the Stage borders.
Choose View > Grid > Edit Grid. In the Grid dialog box, type 10 px in the grid width text box and 10 px in the grid height text box. Select Snap to Grid and verify that Show Grid is not selected. Objects will now snap to the grid, even when the grid is not visible.
Verify that Normal is selected for Snap Accuracy, and click OK. Snap accuracy determines how close an object must be to a grid line before snapping to it.
Create a gradient background A gradient displays subtle variations of a color, or transitions between two or more colors. In the finished tutorial file, the background is a gradient that blends black and dark blue with a transparent area that allows part of the gray Stage color to be displayed. You achieve this effect using the Color Mixer.
Note: While gradients offer interesting effects in movies, overuse of gradients can adversely affect computer processor speeds and decrease the speed at which an animation plays. When designing a movie, consider both your artistic and performance requirements to determine the best use of gradients.

Drag the shapes on the Stage so that part of the curve shows on the upper left corner and right side of the Stage.
Note: As you complete the tutorial, remember to save your file frequently.
Create a mask The art that you created on the Shapes layer extends beyond the Stage, well into the canvass area. Although the area on the canvass wont appear in your published movie, the art beyond the Stage can be distracting in the authoring environment. While you can erase the part of the shapes that extend into the canvass, a better solution is to apply a mask over the Stage so that only the area under the maskthe entire Stage, in this caseremains visible. This way, if youd like to return to the shapes to modify them, they will be intact.
With the Shapes layer selected, add a new layer to the Timeline and name it Mask. In the toolbox, select the Rectangle tool and draw a rectangle that extends from the upper left corner of the Stage to the lower right corner. This rectangle is the shape of your mask. Anything under the rectangle will be visible.
Right-click (Windows) or Control-click (Macintosh) the Mask layer name in the Timeline and choose Mask from the context menu.
The layer is converted to a mask layer, indicated by a down arrow icon. The layer immediately below it is linked to the mask layer, and its contents show throughout the filled area on the mask. The masked layer name is indented, and its icon changes to a right-pointing arrow. The art on the canvass is no longer visible on the Stage.
Mask layers must be locked for the Mask effect to show. To edit the shapes, you can unlock the Mask and Background Shapes layers. When you finish editing the art, lock the layers again to invoke masking.

Save your file.

Tween bitmap effects within a movie clip
In addition to creating vector art in Flash, you can import bitmap images, which use pixels to display graphics, into your Flash movie and apply various color effects. In this section, youll complete the following tasks:
Import bitmap images Modify bitmap compression Create and edit a movie clip symbol Tween bitmap effects to fade views of the car in and out
To complete this section, you can either continue to work on your mystiletto.fla file, or you can browse to your Flash MX application folder and open Tutorials/FlashIntro/stiletto3.fla. If you do use the stiletto3.fla file, save the file with a new name in your My_Stiletto folder to maintain an unadulterated version of the original file. Import images into the library When you import a file into Flash, you can import it directly into the library.

Fade in the second car As the View 1 Car fades out, another view of the car should fade in.
Add a new layer to the Car Animation Timeline and name it View 2 Fade. On the View 2 Fade layer, add a keyframe to Frame 25. With the playhead still on Frame 25, drag view2.png from the Library panel to the Stage. If the Info panel isnt open, choose Window > Info. Verify that the center square is selected in the Registration indicator, then type 0 in the X coordinate text box and type 0 in the Y coordinate text box. Press Enter or Return. The Property inspector also has X and Y text boxes; however, those coordinates are relative to a registration point in the upper left corner of the movie clip.
Select the view2.png on the Stage and press F8 to make it a symbol. In the Convert to Symbol dialog box, name the symbol View 2 Car. Verify that Movie Clip is selected, and click OK.
In the movie clip Property inspector, select Alpha in the Color pop-up menu and type 0% in the Alpha Amount text box. Add a keyframe to Frame 35 of the View 2 Fade layer. On the Stage, click inside the bounding rectangle of the transparent car. In the movie clip Property inspector, enter 100% in the Alpha Amount text box. On the View 2 Fade layer, select any frame between Frame 25 and Frame 34. In the Property inspector, select Motion from the Tween pop-up menu.
Fade out the second car Now youll create the animation that fades out the second car.
On the View 2 Fade layer, add a keyframe to Frame 60. On the View 2 Fade layer, add a keyframe to Frame 70, and another keyframe to Frame 69. Select the keyframe in Frame 69 of the View 2 Fade layer. Select the View 2 Car on the Stage and use the Property inspector to select an alpha transparency of 0%. On the View 2 Fade layer, select any frame between Frames 60 and 68. In the Property inspector, select Motion from the Tween pop-up menu. Click any frame on the View 2 Fade layer between Frames 71 and 105, and press Delete.
Fade in the third car As the second car fades out, the third car fades in. Youll create that animation now.
With the View 2 Fade layer selected, add a new layer to Timeline and name it View 3 Fade. On the View 3 Fade layer, add a keyframe to Frame 60.
With Frame 60 still selected, drag the view3.png from the Library panel to the Stage. Use the Info panel (choose Window > Info if the panel is closed) to specify 0 for both the X and Y coordinates, and to verify the registration point is centered, as you did for the view2.png. Select view3.png on the Stage and press F8 to make it a symbol. In the Convert to Symbol dialog box, name the symbol View 3 Car. Verify that Movie Clip is selected, and click OK.
In the Property inspector, select Alpha in the Color pop-up menu and type 0% in the Alpha Amount text box. Add a keyframe to Frame 70 of the View 3 Fade layer. On the Stage, select inside the bounding rectangle of the View 3 Car. In the Property inspector, enter 100% in the Alpha Amount text box. On the View 3 Fade layer, select any frame between Frames 60 and 69. In the Property inspector, select Motion from the Tween pop-up menu.

Fade out the third car Youll now create the animation that fades out the third car.
On the View 3 Fade layer, add a keyframe to Frames 95 and 105. With Frame 105 selected in the View 3 Fade layer, select the View 3 Car on the Stage and use the Property inspector to select an alpha transparency of 0%. On the View 3 Fade layer, select any frame between Frames 95 and 104. In the Property inspector, select Motion from the Tween pop-up menu.
Fade in the first car As the third car fades out, the first car must fade in to complete the animation.
On the View 1 Fade layer, add a keyframe to Frame 95. With Frame 95 still selected, drag the View 1 Car movie clip (not view1.png) from the Library panel to the Stage. In the Info panel, type 0 in the X coordinate text box and type 0 in the Y coordinate text box. Press Enter or Return. In the Property inspector, select Alpha in the Color pop-up menu and enter 0% in the Alpha Amount text box. Select Frame 104 of the View 1 Fade layer.
Click inside the bounding rectangle of the View 1 Car movie clip on the Stage. In the Property inspector, enter 100% in the Alpha Amount text box. On the View 1 Fade layer, select any frame between Frames 95and 104. In the Property inspector, select Motion from the Tween pop-up menu.
Test the movie At any point during authoring, you can test how your movie will play as a SWF file.
Save your movie and choose Control > Test Movie. Flash exports a SWF copy of your movie. In the SWF movie, the animation automatically plays in a continuous loop.
When you finish viewing the movie, close the SWF file by clicking its close box. In your Flash document, choose Edit > Edit Document or click Scene 1 to return to the main Timeline.
Load dynamic text at runtime
In the lesson Adding and Editing Text, you practiced typing text directly on the Stage. You can also design your movie to include text from external files. One of the easiest ways to accomplish this is to use the loadVariables action to load text from a text file into a dynamic text field at runtime. In the FLA file, you can specify text attributes, such as font style, size, and color, for the dynamic text field. An advantage of keeping text in external files is that anyone who wants to modify the text can work with the text file rather than the FLA file. In this section, youll learn how to accomplish the following tasks:
Import and align a logo Create a dynamic text field Use the Property inspector to assign a text variable name Use the loadVariables action to load text from an external file
To complete this section, you can either continue to work on your mystiletto.fla file, or you can browse to your Flash MX application folder and open Tutorials/FlashIntro/stiletto4.fla. If you do use the stiletto4.fla file, save the file with a new name in your My_Stiletto folder to maintain an unadulterated version of the original file. Import the logo Before creating the dynamic text field, youll import the logo, a Macromedia FreeHand file for which Flash automatically adds a layer on the Timeline.

On the Stage, double-click the right button, Button 1, to open symbol-editing mode. In the Button 1 Timeline, hide all layers except the Color layer. In the Color layer, select the Over keyframe. On the Stage, select the black oval shape for the right button. Press F8 to make the oval a symbol. In the Convert to Symbol dialog box, name the symbol Button Animation. Select Movie Clip, and click OK. On the Stage, double-click the Button Animation symbol to open symbol-editing mode. Rename Layer 1 Color Change, and add a keyframe to Frame 15. With the playhead still on Frame 15, select the button shape on Stage and choose a bright shade of red from the Fill Color pop-up menu in the toolbox. In the Timeline, click any frame between Frames 1 and 13. In the Property inspector, select Shape from the Tween pop-up menu. Drag the playhead from frames 1 to 15 to see the color change.
Add actions to buttons When the user clicks the button and the tweened animation plays, you want the playhead to move to the end of the Button Animation Timeline, then stop. You use ActionScript, the Flash scripting language, to control playhead movement in a Timeline.
Add a new layer to the Button Animation Timeline and name it Actions. On the Actions layer, add a keyframe to Frame 15. If the Actions panel is not open, choose Window > Actions. Enlarge the panel, if necessary, to view both the Actions toolbox and the Script pane.
With Frame 15 of the Actions layer selected, go to the Actions > Movie Control category of the Actions toolbox and double-click stop. The stop action lets you specify that the playhead will stop when it reaches Frame 15.
In the Button Animation Timeline, Frame 15 of the Actions layer now displays a small a, which indicates that an action is attached to that frame.
Add button navigation You use the getURL action to add navigation to a button that opens a Web site.
Choose Edit > Edit Document or click Scene 1 to return to the main movie. On the Stage, click Button 1, the right button. In the Actions panel, choose Actions > Browser/Network and double-click getURL. In the URL text box, type any complete URL, such as http://www.macromedia.com.
In the Window pop-up menu, select _blank to launch a new browser window when the user clicks Button 1.
Save your file, then choose Control > Test movie. Click Button 1 to go to the Web site you specified in step 4. Close the browser and the SWF file, and then return to the Flash authoring environment. If desired, you can select Button 2 on the Stage and repeat steps 3 through 7 to link it to a different Web site, then repeat the steps for Button 3. When you finish linking the buttons, close the Actions panel.

Add streaming and event sounds
When a movie is downloading from an Internet source, a streaming sound can begin to play as soon as the beginning of the sound file has downloaded. Such sounds are especially suited for continuous background sounds. Event sounds must download completely and load into RAM before playing; event sounds are useful for buttons. In this section, youll learn how to accomplish the following tasks:
Add a streaming sound to your movie Add an event sound to a button
To complete this section, you can either continue to work on your mystiletto.fla file, or you can browse to your Flash MX application folder and open Tutorials/FlashIntro/stiletto6.fla. If you do use the stiletto6.fla file, save the file with a new name in your My_Stiletto folder to maintain an unadulterated version of the original file.
Add a streaming sound You can include sound in your movie by dragging the sound to the Stage. Youll add background music that streams and plays for a specified number of times.
In the Timeline, with the Buttons layer selected, add a new layer and name it Sounds. Choose File > Import. Within your Flash MX application folder, browse to Tutorials/ FlashIntro/Assets and click track1.mp3. Control-click (Windows) or Command-click (Macintosh) to add ping.mp3 to the selection, then click Open. The files are imported into the library. With the Sounds layer selected, drag the track1.mp3 sound from the Library panel to the Stage. In the Timeline, a small representation of sound waves appears in the frame. In the Timeline, select the first frame of the Sounds layer. In the Property inspector, type 999 in the Loop text box to specify the number of times the sound can play continuously.

Test the movie

Save your file, then choose Control > Test Movie to hear the sound. When you finish playing the movie, click the movies close box.
Add an event sound to a button In addition to dragging a sound to the Stage, you can select a sound from the Property inspector. You will use this method to add an event sound to a button. As you learned in the Creating Buttons lesson, when you create a button symbol, Flash creates frames for the different button states in relation to the mouse pointer. The Over frame, for example, represents the buttons state when the pointer is over the button. Other button frames/ states are Up, Down, and Hit. Now youll add an event sound to a button, which causes the sound to play during the Over state. Because youre adding the sound to the button symbol in the library, not just to an instance of the symbol, the sound will play for each instance of the button.

On the Formats tab, verify that Flash (.swf ) and HTML (.html) are selected. Click the Flash tab. By default, the movie publishes for the Flash Player. The publishing process also applies movie and JPEG compression.
Click the HTML tab. By default, the publishing process creates an HTML document that inserts your SWF file in a browser window. Settings on the HTML tab of the Publish Settings dialog box determine how the movie appears in the browser.
Change publish settings By default, Flash gives the SWF file the same name as the FLA file. You can tell Flash to change the name.
On the Formats tab of the Publish Settings dialog box, deselect Use Default Names. In the HTML (.html) text box, select the existing text and type a new name, such as stilettoElectric.html. Then click Publish. When the Publishing status window closes, click OK in the Publish Settings dialog box.
View your published movie in a browser You can view the HTML file and SWF movie, which you just published, in your browser.
Open your browser, then open the HTML file that you created. By default, the HTML file is in the same folder as your FLA file. When you open the HTML file, the SWF movie plays within your browser.
In your browser, you can use a command such as View > Page Source or View > Source to view the HTML. OBJECT and EMBED tags ensure that the SWF movie is displayed within the browser.
For additional information about Flash HTML templates, see About HTML publishing templates under Help > Using Flash.

The next steps

By completing all eight sections of the tutorial, youve learned much about creating Flash movies, including how to complete the following tasks:
Analyze a completed movie Define document properties and create a gradient Create and mask vector art Tween bitmap effects within a movie clip Load dynamic text Modify buttons and add navigation Add streaming and event sounds Test and publish a movie
Continue learning more about Flash capabilities by taking the Introduction to ActionScript Tutorial under Help > Tutorials. Designed for ActionScript novices, the tutorial introduces you to scripting concepts while allowing you to build a jigsaw puzzle with actions. Additionally, you can search for articles and Tech Notes about Flash MX in the Macromedia award-winning Support Center. To access the site, go to www.macromedia.com and click Support.
CHAPTER 2 Introduction to ActionScript Tutorial
ActionScript is the scripting language of Macromedia Flash MX. A scripting language is a way to communicate with a program; you can use it to tell Flash what to do and to ask Flash what is happening as a movie runs. This two-way communication lets you create interactive movies. In this tutorial, you will examine the tasks involved in creating an interactive jigsaw puzzle. This tutorial is designed for Flash users who are ActionScript beginners but who want to work toward advanced abilities. You should already be familiar with basic actions and know how to assign them in the Actions panel. To get the most out of this tutorial, you should first complete the Introduction to Flash MX Tutorial, under Help > Tutorials. You should also be comfortable with the concepts presented in Writing Scripts with ActionScript and Creating Interaction with ActionScript, under Help > Using Flash. This tutorial takes approximately one hour to complete, depending upon your experience, and will teach you how to do the following tasks:

Choose File > Save As and save the file with a new and sequential name, such as mypuzzle2.fla, in the same folder as mypuzzle.fla. Making a copy of the file allows you or another user to complete the tutorial again using the original mypuzzle.fla file. Additionally, if you regularly save your file with a new and sequential name, you can revert to an earlier file if you make an error that youre not able to resolve in your current file.
Set movie clip properties The puzzle.fla movie has three dialog boxes: one alerts you when the puzzle is completed, and the other two ask if you want to scramble the puzzle pieces. Additionally, several patterns and guides overlay the solution area to help users solve the puzzle. Each of these dialog boxes, patterns, and guides is a movie clip. To initialize the movie, you must hide several of the movie clips so that only the start dialog box and the puzzle pieces are showing. Youll do this by setting their _visible properties to false.
Select Frame 1 in the Actions layer. If the Actions panel isnt open, choose Window > Actions. The Actions panel shows actions associated with the selected frame. Text after double slashes (//) is commented text, which offers information helpful in understanding the scripts.
Click the pop-up menu in the upper right corner of the Actions panel title bar. Verify that Normal Mode and View Line Numbers are selected.
In the Script pane, click line 4 to select the commented code that reads //ENTER

code here.

From the Actions > Miscellaneous Actions category in the Actions toolbox on the left, double-click the evaluate action to add an empty line of code ending with a semicolon. A semicolon (;) in an ActionScript statement is like a period (.) in an ordinary sentence. With the insertion point in the Expression text box of the Actions panel, click the Insert Target Path button. The Insert Target Path dialog box appears. Verify that Dots, meaning dots notation, and Absolute, meaning absolute path, are selected. In the dialog box, you see a list of movie clips from which you can select. Select the edges movie clip from the movie clip tree, then click OK. The following code appears in the Expression text box:

_root.edges

A target path tells ActionScript the location of a movie clip within the overall structure of a Flash movie. The _root property refers to the main Timeline and the edges movie clip lives on the Stage of the main Timeline. Any target path that begins with _root is called an absolute path because it gives the complete path to a movie clip from the main Timeline.

The first line of code inside the event handler sets the visibility of the pattern movie clip to false. The second line of code sets the visibility of the edges movie clip to the opposite of what it currently is. This creates a toggle that either shows or hides the movie clip.
Control the flow of the movie
Without ActionScript, a movie plays from Frame 1 to the last frame and either repeats from Frame 1 or stops. You can use ActionScript to control the progression of a movie more precisely; you can also use it to give the user control. For example, you could place an action in Frame 5 that stops the movie until a user presses a Play button. This is a simple example of controlling the flow of a movie.
You can use the if, else, and else if actions (also called statements) to create a more complex movie flow called logic. These three actions perform the following tasks:
The if action lets Flash check a condition in the movie and run certain actions if that

condition is true.

The else statement tells Flash to run a different set of actions if the if condition is false. The else if statement lets Flash check for another condition before running yet a different
set of actions. Write a conditional statement Youve already used an operator to show and hide a movie clip. Now youll use an if statement to create logic that shows and hides the piece numbers movie clip. For the sake of learning, this example uses a different ActionScript element to achieve the same result.
Note: You can also browse to your Flash MX application folder and open Tutorials/ActionScript/Finished/ puzzle5.fla. If you do use the puzzle5.fla file, save the file with a new name in your My_Puzzle folder to maintain an unadulterated version of the original file.
On the Stage, click the Show/Hide Piece number matrix button. If the Actions panel isnt open, choose Window > Actions. In the Actions toolbox, choose the Actions > Conditions/ Loops category. Double-click the if action. The following code appears in the Actions panel:

A command in ActionScript is called a function. A function is a script that you can use over and over again in a movie to perform a certain task. For example, in puzzle.fla, every time a user clicks a Scramble Pieces button, the function Scramble is run, or called. This function places the puzzle pieces in random positions on the Stage. Instead of rewriting that same script on each of the two Scramble Pieces buttons, the function is written, or declared, once and called from each button. To examine the Scramble function, select Frame 1 in the main Timeline and open the Actions panel. Scroll down the Script pane until you see the Scramble function. You can think of a function as a machine that does extra work for you. The machine can produce different results depending on what you put into it. For example, if you put bananas in a blender, you get mashed bananas, not mashed peaches. The elements you pass to a function to work on are called parameters or arguments. Parameters are passed inside the parentheses that follow the function. For example, the function RotateDisplayOrDrag(whichPiece) is passed the name of a puzzle piece, and it operates only on that piece. Parameters allow you to reuse functions in many different situations. Functions are usually declared in the first frame of a movie. In the puzzle.fla files, the functions are declared in Frame 1. Write a function Now youll declare a function that will rotate, display, or drag each puzzle piece when the user clicks it.
Note: You can also browse to your Flash MX application folder and open Tutorials/ActionScript/Finished/ puzzle6.fla. If you do use the puzzle6.fla file, save the file with a new name in your My_Puzzle folder to maintain an unadulterated version of the original file.
Select the first frame of the Actions layer and open the Actions panel if its not already open. Scroll down the Script pane and select line 31. The following commented line should be highlighted:
// ENTER RotateDisplayOrDrag() function here
From the Actions > User Defined Functions category in the Actions toolbox, double-click the function action. Type RotateDisplayOrDrag in the Name text box. Type whichPiece in the Parameters text box. The code for line 32 now looks like this:
function RotateDisplayOrDrag (whichPiece) { }
The whichPiece parameter, which identifies the selected puzzle piece, will be called three times in the body of the function. When the function is called, the passed parameter is substituted for whichPiece in each statement.
From the Actions > Conditions/Loop category in the Actions toolbox, double-click the if action, the else if action, and the else action.
Note: You can also select the actions from the Plus (+) pop-up menu

Select Frame 1 on the UI layer, then select the CheckBox component on the Stage. Its parameters are displayed in the Property inspector.
Type sweepstakes_box in the Instance Name text box. Type Absolutely! in the Label text box. In the Initial Value parameter pop-up menu, select True. This specifies whether the initial state of the CheckBox component is selected (True) or unselected (False). In the Label Placement parameter pop-up menu, leave the default value set to right alignment. The label will be displayed to the right of the check box.
Do not alter the Change Handler parameter. The Change Handler parameter is the function that you want to execute when the user selects an item. This function must be defined in the same Timeline as the component instance. This parameter is optional and needs to be specified only if you want an action to take place as soon as the user accesses a component. When you finish, the Property inspector should look like the following:
For more information about using the API methods of the FCheckBox component to set additional options for the component, see the FCheckBox (component) entry in the online ActionScript Dictionary in Flash Help. Configure the combo box
Select the ComboBox component on the Stage. Its parameters are displayed in the Property inspector.
Type color_box in the Instance Name text box. Make sure the Editable parameter is set to False. This prevents users from typing in their own text.
The Labels parameter displays a list of values users can select. Click the Labels field, then click the magnifying glass to open the Values pop-up window. Click the Plus (+) button to enter a new value.

Click in the default

field, then type Lightning for the first value.
Click the Plus (+) button to enter the next value. Click in the default Cobalt for the next value. In the same manner, add Emerald to the list.

field, then type

When you are finished, the Values pop-up window should look like the following:
Click OK to close the Values pop-up window. The Data parameter is optional. It is used to specify the values associated with the items (labels) in the list box. There is no need to do that for this tutorial.
The Row Count parameter specifies how many rows are displayed in the window. Since there are three options, change the value to 3. There is no need to enter a Change Handler parameter name. When you are finished, the Property inspector should look like the following:

For more information about using API methods to change additional properties, see the FComboBox (component) entry in the online ActionScript Dictionary in Flash Help. Configure the push buttons
Select the PushButton component in Frame 1. The components parameters are displayed in the Property inspector.
Type submit_btn in the Property inspector Instance Name text box. Type Submit in the Property inspector Label text box. This text is displayed in the body of the button. Type onClick for the Click Handler name. Later you will write ActionScript to define what the Click Handler should do. When you are finished, the Property inspector should look like the following:
Select the PushButton component in Frame 6. Type return_btn in the Property inspector Instance Name text box. Type Return in the Property inspector Label text box. Type onClick for the Click Handler name.
For more information about using the API methods of the FPushButton component to change additional properties, see the FPushButton (component) entry in the online ActionScript Dictionary in Flash Help. Write ActionScript to gather the data Some of the ActionScript will be for the entire movie, while some will be related to a particular frame. The following table will help you keep track of instance names.
Instance name color_box sweepstakes_box submit_btn name email return_btn name_result email_result color_result sweepstakes_text Description Color combo box on page 1 Sweepstakes check box on page 1 Submit push button on page 1 Input text box for name on page 1 Input text box for e-mail address on page 1 Return push button on page 2 Dynamic text box on page 2 to display the users name Dynamic text box on page 2 to display the users e-mail address. Dynamic text box on page 2 to display the users color selection Dynamic text box on page 2 that displays different text if the user has chosen or not chosen to enter the sweepstakes
Write ActionScript for the entire movie ActionScript for components is placed in keyframes. The Click Handler parameter specifies what happens when the PushButton component is activated. The default value is onClick, which means that when the user clicks one of the push buttons, it is activated. We will begin by creating a function for onClick. This will be a branching function that will first determine whether the button pushed was the Submit or the Return button, then carry out actions accordingly.
Create a new layer and name it All Actions. This will be used for ActionScript that should run throughout the movie. If the Actions panel is not open, choose Window > Actions. Switch to expert mode by pressing Control+Shift+E (Windows) or Command+Shift+E (Macintosh), or by clicking the control in the upper right corner (a triangle with a check mark above it) and selecting Expert Mode from the pop-up menu.

Create a new layer and name it Frame Actions. Select Frame 1, then choose Insert > Blank Keyframe to insert a keyframe. Use the Property inspector to name the keyframe pg1. In the same manner, insert a keyframe at Frame 6 and name it pg2.
Select the keyframe in Frame 1 of the Frame Actions layer and write the following ActionScript to stop the movie at Frame 1 (pg1):

stop();

(Optional) If you want to display certain text if the user has selected the sweepstakes check box and other text if the user has not, you can write a conditional statement with text that will go into the sweepstakes_text dynamic text field on page 2. Select the keyframe named pg2 in the Frame Actions layer and enter the following in the Actions panel:
// sweepstakes text if (sweepstakes_result==true) { sweepstakes_text = "You have been entered in the Stiletto Fantasy sweepstakes. Winners are announced at the end of each month."; } else { sweepstakes_text = "You have not been entered in the Stiletto Fantasy sweepstakes."; }
Note: Do not cut and paste this ActionScript into the Actions panel. It will not work properly, because there are line breaks between the first and second lines of text.
Test your movie To see what the components look like, run your movie in the Flash Player 6.
Select Control > Test Movie. The movie is run in the Flash Player. Select and deselect the check box to be sure it works. Select a color and make sure it appears on page 2. When you are finished, select File > Close to close the movie in the player. If you noticed any errors, use the Arrow tool to select the component, then make the corrections in the Property inspector. If necessary, retest the movie.
This tutorial has presented the basic steps for creating a simple group of components and then displaying the results. For more information, see Using Flash and the ActionScript Dictionary, both found in the Help menu.

 

Tags

LQ-680 PRO M197DN WF-T9235TP XSU-00850B Asus Asms Awyahdc Ue46c8000XP SRU3003WM 17 Receiver EPC2203 Professional Care IZ16S RHT-G550 Chess JD-KS17 Travelmate 4720 SE-U33GX -TRS-80- A7V266 M4N78 PRO AVR25 Adapter-d300 Assist Z205 32LG4000-ZA AEU Digitech BP8 W1542S-PF Purifier 2100TN SPA2102 Passport P150 Handheld RV6 D RP-21FB32 21PT5322 240TI PT-520 Cyber-deluxe Khbf336HWG Alum12N XP7030 DSC-S980 P Asus P5SB AVR-4310CI ETE6110K Review Transceiver Design 3 14PT135A CDR950 ER8497BX Breil AS10 B1100 380EX Exploreur 3D Sppq110 CDC1255Z Design U5 Mansion SR-L39NEB Sbchc8440 05 Combo Pentax KM D-160 V2 AR-M160 205 AVR480 Sorbetiere Printer G31M3 AWP-ZX7 DVD5353 Controller Blazer12 32PFL5322 Beauty BOX DMC-G10K TH-S1 Neff T43T 21GR1251 26121T AJ-D960 Exai4580 PX-716A PK-101 ESF 2410 TK-3180 A-402R 21HT-15C 16C Gloss HT-TX75T 105VR 181 D C525BEE Vitesses Control 4X4-2001 Gpsmap 521S Lavalux LE Dimension 2200 VR702 WR250FP 500GB

 

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