1. Trang chủ
  2. » Công Nghệ Thông Tin

Thiết kế flash với flash cs5 part 72

6 197 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Adding a Button
Thể loại Chapter
Định dạng
Số trang 6
Dung lượng 814,22 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Open the Properties panel, and then click the Component Parameters arrow to expand it.. Click the Value field, and then enter a label for the Button component.. Click the Value field

Trang 1

The Button component is a clickable rectangular button, which can be resized If you desire, you can add a custom icon to the Button compo-nent In addition, you can change the behavior of a Button component

from push to toggle A toggle button stays pressed when clicked and

returns to its up state when clicked again All of these options are accomplished through the Component Inspector panel

Adding a Button

Add a Button Component

Open the Components panel.

Click the User Interface arrow to

expand the list

Drag the Button component onto

the Stage, and then select the

component

Open the Properties panel, and

then click the Component

Parameters arrow to expand it.

Select from the following Button

parameters:

icon (2.0) Click the Value field,

and then enter the full path

name to an icon file

emphasized (3.0) When you

select the check box, it adds a

border around the button If you

deselect the check box, the

button is normal

label Click the Value field, and

then enter a label for the

Button component

labelPlacement Click the Value

field, and then select between

right, left, top, or bottom for the

placement of the Button

component text

selected When you select the

check box, the button appears

selected If you deselect the

check box, the button is normal

5

4

3

2

2 3

Trang 2

toggle When you select the

check box, the button, when

selected, returns a true value If

you deselect the check box, the

button returns false when

selected

enabled When you select the

check box, the button can be

clicked If you deselect the

check box, the button is grayed

out and cannot be clicked

visible When you select the

check box, the Button can be

viewed If you deselect the

check box, the Button is

invisible

minHeight (2.0) Click the Value

field, and then enter a minimum

height for the Button

minWidth (2.0) Click the Value

field, and then enter a minimum

width for the Button

Click the Control menu, point to

Test Movie, and then click Test.

In the example, when you click the

button, it changes color, just like a

typical rollover button You could

now attach an ActionScript to the

button to load another scene or

movie

6

6 5 4

Trang 3

The List component is a scrollable box that lets users select one or more items in the list Lists are similar to the ComboBox component, except List components can be formatted to display all of the available items at once, where as the ComboBox component uses a drop-down (or up) feature to display the items only when requested (clicking the tri-angle button to the right of the list)

Adding a List

Add a List Component

Open the Components panel.

Click the User Interface arrow to

expand the list

Drag the List component onto the

Stage, and then select the

component

Open the Properties panel, and

then click the Component

Parameters arrow to expand it.

IMPORTANT The List

component reduces the clutter of

a typical data screen by allowing

you to control the height of a data

box For example, if you wanted a

visitor to select their home State

from a list, you wouldn't want all

50 States permanently displayed

on the screen You would create a

more manageable box size, and

make the visitor scroll up or down

to select the correct State

Select from the following List

parameters:

data (2.0) or dataProvider (3.0)

Click the Edit button, and then

enter an array in the Values

dialog box Click the plus (+)

sign to add a value, and the

minus sign (-) to remove a

value Data values are used to

populate the list labels

enabled (3.0) When you select

the check box, the field can be

5

4

3

2

2

3

Trang 4

labels (2.0) Click the Edit

button, and then enter an array

in the Values dialog box Click

the plus (+) sign to add a value,

and the minus sign (-) to

remove a value Data values

are used as the selectable

items in the list

multipleSelection (2.0) or

allowMultipleSelection (3.0)

When you select the check

box, the visitor can select more

than one item in the list If you

deselect the check box, the

visitor can only select a single

item

rowHeight (2.0) Click the Value

field, and then enter a number

to determine the spacing

between items in the list The

higher the value, the more

space between items

horizontal or vertical

ScrollPolicy (3.0) Click the

Value field, and then select

auto, on, or off to show or hide

scroll bars

horizontal or vertical Line or

Page ScrollSize (3.0) Click the

Value field, and then enter a

number for the scroll size

visible (3.0) When you click the

Value field, and select true, the

list can be viewed If you select

false the list is invisible

Click the Control menu, point to

Test Movie, and then click Test.

In the example, click on a Chapter,

and then select that chapter You

can now attach an ActionScript to

the list to load the correct chapter

6

6 5

4

Trang 5

A Label component consists of a single line of text You can specify that

a label be formatted with HTML You can also control alignment and sizing of a label Label components do not have borders, nor do they contain input that can be changed by the user They are simply text information Labels can be used to identify data input fields, or they can contain visitor information important to the understanding of a form

Labels can change what they display, as the Flash movie plays

Adding a Label

Add a Label Component

Open the Components panel.

Click the User Interface arrow to

expand the list

Drag one or more Label

components onto the Stage, and

then select the component, one at

a time

Open the Properties panel, and

then click the Component

Parameters arrow to expand it.

Select from the following Label

parameters:

autoSize Click the Value field,

and then select between left,

center, right, or none The

autoSize parameter uses this

information when automatically

resizing the text

condenseWhite (3.0) When you

select the check box, it

removes extra white space

(spaces, line breaks) in a text

field If you deselect the check

box, the white space remains

enabled (3.0) When you select

the check box, the field can be

edited If you deselect the

check box, the field appears

grayed out and is not

selectable, or editable

5

4

3

2

2

3

Label component

Trang 6

html (2.0) When you select the

check box, it allows HTML to

control the formatting of the

text If you deselect the check

box, the field cannot be

modified using HTML

text Click the Value field, and

then enter the text that will

appear in the field when the

Flash document opens

selectable (3.0) When you

select the check box, the field

text is selectable If you

deselect the check box, the

field text is not selectable

visible When you select the

check box, the field can be

viewed If you deselect the

check box, the field is invisible

minHeight (2.0) Click the Value

field, and then enter a minimum

height for the Label

minWidth (2.0) Click the Value

field, and then enter a minimum

width for the Label

wordWrap (3.0) When you

select the check box, the text

typed by the visitor wraps in

the TextArea box If you

deselect the check box, the

text will not wrap

Click the Control menu, point to

Test Movie, and then click Test.

In the example, the Label

components represent visitor

information in which the labeling

fields require visitor input

6

6

5 4

Ngày đăng: 29/10/2013, 01:15