Chapter 14 Events, Scripts and Interactivity. Key Points ► Actions, usually implemented by scripts are executed in response to events, such as mouse clicks.

Slides:



Advertisements
Similar presentations
17 HTML, Scripting, and Interactivity Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and.
Advertisements

Introduction to Macromedia Director 8.5 – Lingo
Introduction to Macromedia Director 8.5 – Technology directing a script / play Macromedia Director 8 Shockwave Studio is the world's foremost authoring.
Combining Media 8. Key Points There are two models for combining elements of different media types: page-based and synchronization-based Hypermedia is.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
The Web Warrior Guide to Web Design Technologies
Copyright © 2003 Pearson Education, Inc. Slide 2-1 Created by Jim Lengel, College of Communication, Boston University Web Wizard’s Guide to Shockwave.
Chapter Concepts Review Markup Languages
Macromedia Director 8 Advanced Level Course. Script Basics Lingo can be used to offer your users navigational control of the order of the scenes of your.
Tutorial 10 Programming with JavaScript
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
THE BASICS OF THE WEB Davison Web Design. Introduction to the Web Main Ideas The Internet is a worldwide network of hardware. The World Wide Web is part.
Web Design Basic Concepts.
COM 205 Multimedia Applications
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Chapter 11 Adding Media and Interactivity. Flash is a software program that allows you to create low-bandwidth, high-quality animations and interactive.
© 2011 Delmar, Cengage Learning Chapter 11 Adding Media and Interactivity with Flash and Spry.
What is Web Design?  Web design is the creation of a Web page using hypertext or hypermedia to be viewed on the World Wide Web.
Chapter 4 Dreamweaver: Part II The Web Warrior Guide to Web Design Technologies.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
Chapter 11-Multimedia Authoring Tools. Overview Introduction to multimedia authoring tools. Types of authoring tools. Cross-platform authoring notes.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
CS346 - Javascript 1, 21 Module 1 Introduction to JavaScript CS346.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 16 This presentation © 2004, MacAvon Media Productions Scripting & Interactivity.
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
Advanced Web Design Scripting Tutorial Chapters. Scripting Intro The scripting part of the forthcoming Advanced Web Design textbook introduces you to.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
CMPD 434 MULTIMEDIA AUTHORING Chapter 06 Multimedia Authoring Process IV.
Flash & JavaScript Mariela Hristova October 19, 2004 INF 385E – Fall 2004 – School of Information.
Web Programming : Building Internet Applications Chris Bates CSE :
Lesson13. JavaScript JavaScript is an interpreted language, designed to function within a web browser. It can also be used on the server.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Tutorial 10 Programming with JavaScript. XP Objectives Learn the history of JavaScript Create a script element Understand basic JavaScript syntax Write.
CHAPTER TEN AUTHORING.
Tutorial 8 Programming with ActionScript 3.0. XP Objectives Review the basics of ActionScript programming Compare ActionScript 2.0 and ActionScript 3.0.
An Introduction to JavaScript Summarized from Chapter 6 of “Web Programming: Building Internet Applications”, 3 rd Edition.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Interactive Client-Side Technologies MMIS 656 Web Design Technologies Acknowledgements: Estrella, S. (2003). The Web Wizard’s Guide to DHTML and CSS.
Application Software Practical 9/10/11/12 Macromedia Director.
JavaScript - A Web Script Language Fred Durao
MACROMEDIA DIRECTOR - LECTURE NOTES -. INTRODUCTION Macromedia Director 8.5 is the best selling multimedia authoring program and leading tool for creating.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Scripting and Interactivity 이병희
Introduction to Interactive Media Interactive Media Tools: Authoring Applications.
Macromedia Flash 8 Revealed WORKING WITH SYMBOLS AND INTERACTIVITY.
Reading Flash. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also choose some.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
Tutorial 7 Creating Animations. XP Objectives Learn about animation Create a timeline Add AP divs and graphics to a timeline Move and resize animation.
Chapter 11 Adding Media and Interactivity. Chapter 11 Lessons Introduction 1.Add and modify Flash objects 2.Add rollover images 3.Add behaviors 4.Add.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
Section 10.1 Define scripting
DHTML.
Section 17.1 Section 17.2 Add an audio file using HTML
CHAPTER 8 Multimedia Authoring Tools
Tutorial 6 Creating Dynamic Pages
Scripting & Interactivity
Presentation transcript:

Chapter 14 Events, Scripts and Interactivity

Key Points ► Actions, usually implemented by scripts are executed in response to events, such as mouse clicks or key presses, thus providing enhanced interactivity. ► The standard for World Wide Web client-side scripting comprises the ECMAScript language, which interacts with elements of the Web page and browser via objects in the W3C Document Object Model (DOM). ► Fourth generation Web browsers only provide partial and incompatible implementations of these standards. JavaScript and dynamic HTML are loosely used to refer to the available implementations.

Key Points ► ECMAScript is object-based, and the DOM provides host objects that correspond to the document elements of a Web page, so that these can be created and changed dynamically by scripts. ► Event handlers are associated with elements and events by event-related HTML attributes, such as onClick and onMouseOver. They are used to implement rollover buttons and to add animation to Web pages.

Key Points ► Host objects corresponding to style elements and stylesheets allow scripts to alter the appearance of a page dynamically. ► Behaviours are parameterized actions provided by an authoring system (e.g. Director, Dreamweaver or Flash) to implement a limited repertoire of actions without scripting.

Key Points ► When a timeline is used to organize a multimedia production, actions can be associated with time- based events, such as the playback head entering a particular frame, and can control playback by causing a jump to a particular frame. ► Xtras can be used to extend Director and embed custom C++ code in a Director movie. Applets can be used to embed executable content in Web pages.

Introduction ► OS  Event-driven system ► Double-clicks ► Associate actions with events ► A pre-defined set of actions (behaviors) to perform common tasks, such as opening a file ► Scripting language  A small programming language with facilities for controlling user interface elements and multimedia objects.

Reasons for Using Actions ► Reason for associating actions with events  To provide interactivity ► Users can control the system’s behavior. ► Users can direct the flow of information that they receive. ► Events that occur at specific times  Allow time-based behavior and synchronization to be introduced into systems  Actions in timeline ► Provide non-linearity

Scripting Fundamentals ► C++, Java  Control structures, abstraction mechanisms, and built-in data types ► Scripting languages  Some Control structures and a few basic types  May provides some abstraction mechanisms  Provides objects and data types that belong to some ‘existing system’ ► Relational database system  Relations and tuples

Multimedia Scripting ► Provide objects corresponding to the elements of a multimedia production ► It is not adequate to provide a type for each medium- text, sound, video, and so on- the types of objects are available need to take account of the way in which media objects are combined within the production. ► A scripting language for use with XML or HTML, objects must be provided that correspond to document elements and to elements of user interface such as windows.  Time-line based system, such as Flash ► Objects= frames and various object elements that may apear inside them

Multimedia Scripting ► Scripting language  Perform computations on the attributes of objects  Create new objects  Affecting their appearance and behavior  Triggered by event

WWW Client-side Scripting ► Server-side  Enable an HTTP server to communicate with other resources, such as databases, and incorporate data obtained from them into its response.  Web pages dynamically form time-varying data ► Client-side  Appearance and behavior of Web pages  Allowing code has been downloaded from Internet to rin on your system.  Scripts cannot ► access any local resources such as files ► make any network connections ► Their interaction with server is limited to requesting new resources and posting information form HTML forms. ► Secure but limited  Provide feedback to user

Scripting ► First scripting: Netscape LiveScript  Change to JavaScript ► Microsoft: Jscript ► ECMA (European Computer Manufactures’ Association)  ECMAScript based on JavaScript and Jscript  Object-based  Objects= ► elements in HTEM document and Styles ► Components of browser interface ► W 3 C’s Document Object Model (DOM)

ECMAScript Syntax ► Untyped language  The same variable can hold a string at one time, a number at another and a boolean at another. ► Unicode characters ► Arrays, objects ► Built-in objects: Math, Date, host objects

Objects ► Creation and manipulation of objects ► Not organized into hierarchical classes ► Properties  Named data items ► Methods  Functions ► P. 455 ► document.write: dynamically generated content ► Fig. 14.2: Prompting for user, P.457 Data Function Property Method Object Event Handler

Event Handlers ► Table 14.1 ► P. 459,  onMouseOver=“in_image()” onMouseOut=“out_of_image()” ► Updating src property  Improvement of animated GIFs  Using Script ► Arrange for animation to be stared and stopped by a control ► onMouseOver=“start-animation()” onMouseOut=“stop_animation()” ► setTimeout (code, delay)  Execute code after a delay

Scripts and Stylesheets ► Content appearance: stylesheets ► Altering stylesheets  documet.all.intro.style.color=‘black’  Docuemt.stylesheet[0].rules[1].style.color= ‘fuchsia’ ► stylesheet[0], first STYLE, starting at zero  Absolute Positioning

Text animation ► SPAN= layer  Apply positioning style ► Layer 1: (40,35), Layer 2: (540,300) visibility property= hidden ► P. 466

Behavior ► A set of parameterized actions ► A suitable interface for attaching behavior to elements of production  Much of necessary for scripting is removed  Without having to acquire programming skills  Parameterized actions= behavior  ECMAScript behavior

► Behaviors in PDF is fixed ► Modern browser  Arbitrary behaviors can be written in scripting language  Macromedia Dreamweaver ► Dreamweaver’s behaviors palette (Fig. 14.4) ► Behavior groups  Display status message and popup message display  Check browser’s capabilities ► Check Browser, Check Plugin  Control over browsers and page elements ► Control shockwave or Flash, Control sound behaviors  Concerned with images and motion graphics ► Swap Image, Preload Images

► Show-Hide Layers ► Change Property ► Drag Layer  add basic drag and drop functionality

Timeline Scripting and Behavior ► Scripting: interactivity and non-linearity ► Flash ► An action is attached to a key frame simply by selecting the key frame and appropriate menu command, choosing one of the available behavior, and entering values for its parameters ► The action is trigged when playback reached the frame to which it is attached. ► Button= special symbols  Four frames= up, over, down, hit area ► Timeline behavior  Play, Stop, Go To

Flash ► Timeline with selections, Fig ► Levels, Fig ► Tell Target  Sent an event from one object to other  Movie control

► Dreamweaver  Offer timeline interface  Timeline= behavior channel, allows actions to be attached to any frame  Several layers can be controlled by the same timeline.  Several different timelines can be attached to the same page.  Hand-crafted scripting vs prefabricated behaviors

► Dreamweaver only ships with a behavior that causes a timeline to go to a specific numbered frame, not to the next or previous one. ► P. 478, movie control, up(), down() ► Behavior + timelines + scripts = dynamic Web pages

Director ► Director  Combination of scripts with a timeline  Provides behaviors that can be attached to frames or sprites to implement the same range of time-based actions and control as Flash.  Message Sprite behavior ► like Tell Target in Flash ► Control one sprite from another  Compose behaviors by combining actions  Scripting language: Lingo ► English-like

Lingo ► Categories  Score scripts ► Same as behavior  Scripts of members  Movie scripts  Parent scripts, new

Beyond Scripting ► Scripts  Lack features: such as file input and output ► Director’s Xtras  Code modules in C or C++  Form support for new media types to networking and database management  Four types ► Transition Xtras: dissolves, wipes,… ► Tool Xtras: new functions to authoring environment ► Sprite Xtras: new classes to cast members ► Scripting Xtras: new command to Lingo, such as fileio extra  Prescribe interface

Java Applets ► Small program in Java ► HTML: ► HTML: ► Formatted and positioned using CSS ► Java VM ► Interpreter ► Security: may not read or write local files ► Java 2D, Java 3D, Java Sound