chapter 13 working with components. chapter 13 lessons 1.use components in a flash movie 2.use...

20
Chapter 13 Working with Components

Upload: roderick-tate

Post on 26-Dec-2015

225 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

Chapter 13

Working with Components

Page 2: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

Chapter 13 Lessons

1. Use Components in a Flash Movie2. Use Components in a Form

Page 3: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

Work with Components

There are three categories of components:

1. User Interface (UI)2. Video

3. Flex

Page 4: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

Work with Components

1. User Interface (UI)—Components (such as buttons and menus) that are used to create the visual interface for a Flash application.

Page 5: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

Work with Components

2. Video—Components used to insert an flv video file into a Flash document and allow the user to control the playback video

Page 6: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

Work with Components

3. Flex—Contains the FlexComponentBase class that is used to develop and deploy cross-platform applications

Page 7: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

• Introduction– You can use components for creating check boxes,

drop-down menus, and forms with boxes for entering user data

– You can add functionality to a movie by dragging and dropping components from the Components panel to the Stage

– You are not required to enter ActionScript code when using components

Work with Components

Page 8: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

• However, you can use ActionScript to enhance the functionality of a component

• In addition to the components provided in Flash, you can obtain other components from third-party companies and individuals

Work with Components

Page 9: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

Use Components in a Flash Application

Each component name and icon provides a clue to its type, such as Button, CheckBox, and ScrollPane.

Components panel showing the User Interface Components

Page 10: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

• Many of the User Interface Components are used as part of forms that can gather data from a user.

• The UILoader Component can load external .jpg graphic files and .swf movie files.

• You can load these files from a folder, using a relative or an absolute path.

Use Components in a Flash Application

Page 11: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

• When you load the files from a folder, it will reduce the size of the movie and allow you to easily update website content by simply changing the .jpg or .swf files on the external site.

• You can load files using ActionScript or by using the UILoader.

Use Components in a Flash Application

Page 12: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

• Depending on the type of component used, you will need to specify one or more of the following parameters:– source—This parameter is used to specify the location for

the content that is to be displayed using the component– scaleContent—This parameter can be turned on and off. If

it is on the content will automatically resize to the size of the component. If it is off, the UILoader will be scaled to the smaller size associated with the object.

Use Components in a Flash Application

Page 13: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

• Parameters Continued…– autoLoad—This parameter can be turned on and off. If it is

turned on, the Component will automatically display the specified contents. If it is turned off, the contents will not be displayed until some other action you specify, such as a button click, occurs

– label—This parameter allows you to type a text label

Use Components in a Flash Application

Page 14: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

The completed Component parameters

Use Components in a Flash Application

Page 15: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

• To use a Component:1. Select the frame and layer where the component

will be placed2. Drag the component from the Components

panel to the desired location on the Stage3. Use the Properties panel to set the component

parameters

Use Components in a Flash Application

Page 16: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

• Flash provides several Components that can be used to create forms.• Survey • Registration form

• Use in:• Websites • Applications

Use Components in a Form

Page 17: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

Use Components in a Form

Sample Form

Page 18: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

The Process for Developing a Form

• Plan out the form including:• each Component to be used• its location

• Drag each Component to the Stage • Position Component as desired

Use Components in a Form

Page 19: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

Once a Component is placed and while it is selected, use the Properties panel to:• Change its properties, such as the

size• Specify other properties, such as

labels and values

Use Components in a Form

Page 20: Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form

Use Components in a Form

Change component settings in the Properties dialog box