+ All Categories
Home > Documents > XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2...

XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2...

Date post: 11-Jan-2016
Category:
Upload: corey-dean
View: 213 times
Download: 0 times
Share this document with a friend
25
XP Tutorial 5 Buttons, Behaviors, and Sounds
Transcript
Page 1: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

XP

Tutorial 5

Buttons, Behaviors, and Sounds

Page 2: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

2

XPButtons

• Interactive means that the user has some level of control over the movie, such as being able to stop or play its animation.

• Buttons are symbols that contain a Timeline with only four frames, each of which represents a different state of the button.– Up frame– Over frame

• Rollover effect

– Down frame– Hit frame

Page 3: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

3

XPButtons

Page 4: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

4

XPAdding a Button from the Common Libraries

• A quick way to add buttons to your document is by using one of the buttons in the Buttons library.

• The Buttons library is one of the Flash Common Libraries.

Page 5: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

5

XPViewing the Playback – Stop Button’s Behavior

• Once you have added a button instance to a document, it is a good idea to see how it works.

• Click Control on the menu bar, and then click Enable Simple Buttons.

• Click a blank area of the Stage away from the button to deselect the button.

• Position the pointer over the playback-stop button instance on the Stage.

• Click the playback – stop button.

Page 6: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

6

XPEditing the Button to Change its Color

• Double-click the button’s icon in the Library panel to open it in symbol-editing mode.

• If necessary, increase the magnification of the button.

• Click the Down frame of the appropriate layer in the Timeline. Change the color of the object associated with this layer by using the Fill Color pop-up window on the toolbar.

Page 7: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

7

XPEditing the Button to Change its Color

Page 8: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

8

XPCreating a Button

• Create the button’s shape on the Stage and select the shape.

• Click Modify on the menu bar, and then click Convert to Symbol.

• In the Convert to Symbol dialog box, name the symbol and assign the Button behavior to it.

• Add a text block to the button to label it.

Page 9: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

9

XPTesting the Button Instance’s Rollover Effects

• After you are finished creating the button and its different states, preview the button instance’s behavior on the Stage.

• Click Control on the menu bar, click the Enable Simple Buttons command to select this option, and then click a blank area of the Stage to deselect the button.

• Move the pointer over the button to see the rollover effect, and then click the button.

• Click Control on the menu bar, and then click the Enable Simple Buttons command to deselect it.

Page 10: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

10

XPTesting the Button Instance’s Rollover Effects

Rollover effect

Page 11: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

11

XPAligning the Buttons

• When adding several similar objects to a document, you should align the objects.

• Buttons should be lined up vertically or horizontally and they should be evenly spaced to give your document a professional appearance.

Page 12: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

12

XPAligning Buttons Using the Align Panel

• Click Window on the menu bar, point to Design Panels, and then click Align to open the Align panel.

• Using the Selection tool, click the first button instance on the Stage, press and hold the Shift key on the keyboard, and then click the remaining buttons.

• Make sure the To Stage button on the Align panel is not selected.

• Click the Align bottom edge button in the Align panel.• Click the Space evenly horizontally button.• Close the Align panel, and save the changes you have

made to your document.

Page 13: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

13

XPUnderstanding Actions and Behaviors

• Actions are instructions that are used to control a document while its animation is playing.

• Actions are part of Flash’s programming language called ActionScript, which is very similar to JavaScript.

• A script is a set of one or more actions that perform some function.

• An event is a situation where the user is interacting with a button such as clicking a button with a mouse and then releasing it.

• Behaviors are actions with pre-written ActionScript scripts which assign controls and transitions to an object on the Stage.

• An event handler tells Flash how to handle an event.

Page 14: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

14

XPBehaviors and Scripts

Goto and Play action

event

Delete Behavior button

Add Behavior button

Symbol and name of object

Event handler

comments

event

action

Page 15: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

15

XPAdding Behaviors Using the Behaviors Panel

• When adding behaviors to a button, you add them to the button instance on the Stage and not to the button symbol in the library.

• If you want an action to execute at a certain point in the animation, then attach it to the frame where you want it to start.

Page 16: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

16

XPAdding Behaviors to Frames

• Behaviors in a frame execute when a particular frame is played.

• You can create an animation in which a group of frame is played repeatedly by having the playhead go back to an earlier time. This is called a loop.

Page 17: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

17

XPTesting the Frame Behavior

• Click Control on the menu bar, and then click Test Movie. The animation plays and when the playhead reaches the end of the loop, it goes back to the frame labeled Loop Start.

• Click File on the menu bar, and then click Close to return to the document.

• Save the changes to your document if the frame behavior is acceptable to you.

Page 18: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

18

XPSound

• Macromedia Flash offers several ways to use sounds.

• You can add sounds to your document to play continuously and that are independent of the Timeline.

• You can add sound effects to instances of buttons to make them more interactive.

• You can also add sounds that are synchronized with the animations.

• Sounds can be added in the form of voice narrations.

Page 19: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

19

XPTypes of Sounds

• Event sounds, which are the default type, will not play until the entire sound has downloaded completely.

• Stream sounds are synchronized with the Timeline and begin playing as soon as enough data has been downloaded.

Page 20: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

20

XPFinding Sounds for Your Documents

Flash Kit’s Web site

Page 21: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

21

XPFinding Sounds for Your Documents

• Killersound at www.killersound.com• SoundShopper.com at www.soundshopper.com• It is best to look for sounds that are royalty free,

which means that there are no additional usage fees when you distribute them with your projects.

• Sounds to be used with your documents must first be imported into Flash.

Page 22: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

22

XPAdding a Sound to a Button

• Import the sound to the document’s library.• Open the button in symbol-editing mode.• Create a new layer in the button’s Timeline.• Create a keyframe in the frame where the sound

will be placed.• Select the keyframe.• Select the sound from the Sound list box in the

Property inspector or drag it from the Library panel to the Stage.

Page 23: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

23

XPSound Settings

• Once you have added a sound to your document, you can control the way it plays by using the sound settings found in the Property inspector.

Sound information

Sound name

Click to see available sound effects

Number of times to repeat

Page 24: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

24

XPSound Effects

Page 25: XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX 2004 2 Buttons Interactive means that the user has some level.

New Perspectives on Macromedia Flash MX 2004

25

XPSound Settings

• The Sync list box lets you set a sound as an Event sound or as a Stream sound.

• You can also control event sounds by using the Start and Stop sync settings.

• If you want a sound to play continuously for a period of time, then enter a number in the Repeat text box that specifies how many times you want the sound to play.


Recommended