copyright © 2003 pearson education, inc. slide 7-1 created by jim lengel, college of communication,...

15
Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave by James G. Lengel

Upload: ezra-wilkins

Post on 24-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-1

Created by Jim Lengel, College of Communication, Boston University

Web Wizard’s Guide to Shockwave by James G. Lengel

Page 2: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-2

Chapter 7Creating Complex Interaction

When sorrows come, they come not single spies, but in battalions.—from Hamlet

Page 3: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-3

Objectives

To learn how to animate a sprite with a Lingo script and how to program random events into a Shockwave project

To learn how to modify sprites with Lingo scripts and how to build sliders that enable the user to modify the Shockwave environment

To learn how to use scripts to make text interactive To learn how to make sound interactive To learn how to make video interactive To learn how to interact with Web resources To learn how to create custom cursors To learn how to write a script for score keeping

Page 4: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-4

Animating with Lingo

Setting and changing a sprite’s location Scripting random movement Changing color, rotation, and size Switching cast members

Page 5: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-5

Repeat loops

on mouseUprepeat with x = 1 to the number of words of field "textpassage"

if word x of field "textpassage" contains field "searchword" then

hilite word x of field "textpassage"

end ifend repeat

end mouseUp

Page 6: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-6

Making sliders for user control

Page 7: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-7

Text functions with Lingo

Changing text appearance Adding text to a field Creating Hypertext systems Working with string functions

Page 8: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-8

Creating interactive text

Page 9: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-9

Interacting with Sound

In the sound channels As a puppet sound In a sprite channel

Page 10: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-10

Interacting with Video

Prepare the video Import the video Set video properties Place video on the Stage Control the video with scripts

Page 11: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-11

Interacting with Web resources

Linking to Web resource (goToNetPage) Importing a Web resources

Page 12: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-12

Creating Custom Cursors

Big colorful cursorson exitframe set the locH of sprite 30 to the mouseH set the lochV of sprite 30 to the mouseV go to the frame

end exitframe Little black-and-white cursors

on exitframecursor [56]

end exitframe

Page 13: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-13

Changing Cursor on Rollover

set the cursor of sprite 5 to [56]

Or

on mouseEntercursor [56]

end mouseEnter

on mouseLeave

cursor –1

end mouseLeave

Page 14: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-14

Keeping Score

Incrementing a value Right answer:

on mouseUppuppetsound 1, "correctsound"put value(field "score") +5 into field "score"

end mouseUp Wrong answer:

on mouseUppuppetsound 1, "wrongsound"put value(field "score") -5 into field "score"

end mouseUp

Page 15: Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave

Copyright © 2003 Pearson Education, Inc. Slide 7-15

Summary

You can use Lingo scripts to display complex animations in response to user actions and to create random movement and other events.

You can make many aspects of a sprite’s display responsive to user action. You can make text interactive in a variety of ways, including hypertext

systems, in a Shockwave project. With Lingo scripts, you can make sound interactive and responsive to the

user. You can also make video interactive with the help of scripting. Shockwave projects can embed Web resources such as text, graphics, and

video. Shockwave projects can also link to Web pages and other Web resources.

The appearance of the cursor can range widely to help create a more natural and interactive environment.

Giving users feedback by including a score-keeping script can enhance your projects.