Events and Animations CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also from.

Slides:



Advertisements
Similar presentations
Introduction to Macromedia Director 8.5 – Lingo
Advertisements

Chapter 08: Adding Adding Interactivity Interactivity With With Behaviors Behaviors By Bill Bennett Associate Professor MSJC CIS MVC.
Servers- Apache Tomcat Server Server-side scripts- Java Server Pages Java Server Pages - Xue Bai.
Programming with JavaScript CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and.
Introduction to JavaScript Module 1 Client Side JS Programming M-GO Sponsored By
Microsoft® Small Basic
 2004 Prentice Hall, Inc. All rights reserved. Chapter 18 – Macromedia Flash MX 2004: Building an Interactive Game Outline 18.1 Introduction 18.2 Object-Oriented.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
CIS101 Introduction to Computing Week 10 Spring 2004.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
JavaScript, Third Edition
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
CSC 2720 Building Web Applications JavaScript. Introduction  JavaScript is a scripting language most often used for client-side web development.  JavaScript.
The Web Wizard’s Guide To JavaScript Chapter 5 More Image Swapping.
1 Events Lect 8. 2 Event-driven Pages one popular feature of the Web is its interactive nature e.g., you click on buttons to make windows appear e.g.,
Chapter 4 Chapter 4 Creating a Simple Page Disclaimer: All words, pictures are adopted from “Learning Web Design (3rdeds.)” by Jennifer NiederstRobbins,
Event-driven Programming
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
Let’s Start! Pages 136 to 140 March 18, Facts about GameFactory2(TGF2) Is a game engine developed by Clickteam. Uses Object-oriented programming.
Tutorial 5 Making a Document Interactive. XP Objectives Explore the different button states Add a button from the Buttons library Edit a button instance.
Chapter 10 Creating Pop-Up Windows, Adding Scrolling Messages, and Validating Forms HTML5 & CSS 7 th Edition.
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
Intro to JavaScript. Use the tag to tell the browser you are writing JavaScript.
Enhancing JavaScript Using Application Programming Interfaces (APIs)
Adobe Flash CS5.5. What is Adobe Flash? formerly Macromedia Flash Is software is a powerful authoring environment for creating animation and multimedia.
JQUERY | INTRODUCTION. jQuery  Open source JavaScript library  Simplifies the interactions between  HTML document, or the Document Object Model (DOM),
JavaScript, Fourth Edition
Programming games Show your version of Bo the dog. Start cannonball Preview: video, audio work session (cannonball) Homework: Cannonball with ball in a.
Tutorial 7 Planning and Creating a Flash Web Site.
Chapter 7: DHTML: Object Model and Collections CIS 275—Web Application Development for Business I.
Browser Object Model& Debugging CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams.
Introduction to Client Side Scripting CS Client Side Scripting Client side means the Browser is interpreting the script Script is downloaded with.
Topic 7 Temporal Control. 2Chapter 25 - Temporal ControlOutline Goals and Objectives Goals and Objectives Introduction Introduction Timeline Animation.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
Ch. 8 Web Page Design – Animation and Behaviors Mr. Ursone.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
JavaScript, Fourth Edition
JavaScript, Fourth Edition Chapter 4 Manipulating the Browser Object Model.
06 – Java Script (2) Informatics Department Parahyangan Catholic University.
HTML JAVASCRIPT. CONTENTS Javascript Example NOSCRIPT Tag Advantages Summary Exercise.
1 CSC160 Chapter 7: Events and Event Handlers. 2 Outline Event and event handlers onClick event handler onMouseOver event handler onMouseOut event handler.
Event Handling. Objectives Using event handlers Simulating events Using event-related methods.
1 CSC317/318 INTERNET PROGRAMING / DYNAMIC WEB APPLICATION DEVELOPMENT Siti Nurbaya Ismail Faculty of Computer Science & Mathematics, Universiti Teknologi.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
CIS 205—Web Design & Development Flash Chapter 3 Appendix on Using Buttons.
Introduction to JavaScript CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also.
Document Object Model CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also from.
JavaScript Event Handlers. Introduction An event handler executes a segment of a code based on certain events occurring within the application, such as.
Chapter 6 Murach's JavaScript and jQuery, C6© 2012, Mike Murach & Associates, Inc.Slide 1.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
CSC 121 Computers and Scientific Thinking Fall Event-Driven Programming.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
Internet & World Wide Web How to Program, 5/e.  JavaScript events  allow scripts to respond to user interactions and modify the page accordingly  Events.
JavaScript, Third Edition 1 SELECTION LIST Demo. JavaScript, Third Edition 2 Description This web page will edit the slection to ensure an option was.
Chapter 13: DHTML: Object Model and Collections CIS 275—Web Application Development for Business I.
 International event so everybody should know about its importance!  Spirit of unity through soccer!  Soccer is my real passion so I would like to.
The Web Wizard’s Guide To JavaScript
CS 330 Class 5 Programming plan for today: Questions on homework
The Web Wizard’s Guide To JavaScript
DHTML Javascript Internet Technology.
DHTML Javascript Internet Technology.
Conditionally Confirming a Submit
Timer-Based Animation
Advanced DHTML, Dynamic CSS
JavaScript Overview By Kevin Harville.
Murach's JavaScript and jQuery (3rd Ed.)
Presentation transcript:

Events and Animations CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also from W3schools. Edited by Guoliang Liu, Only for Course CSc2320 at GSU CS Department

In this chapter Events in JavaScript Animation

Events handler Element with attribute onclick. Onclick with call function Function defined in your script or library.

How the event works One example

How the annoying pop up window works Advertisement pages

Problems with event handler More than one handler with one element

Animation The principles of animations Display n frames or pictures per second

Animation Control time with JavaScript

Animation Set the timer Function ◦ SetTimeout(function, time); ◦ E.g.,

Animation Time in a function

Animation Define function inside functions

Animation Stop the timer ◦ Use function clearTimeout(timer); ◦ E.g.,

Animation Create repeating timer ◦ Use function setInterval(function, time); Stop repeating timer ◦ Use function clearInterval(timer); ◦ E.g.,

Animation Picture animations

Animation Picture animations(cont.)

Animation Another example

Bonus homework Do an animation. ◦ Make one object moving in a circle repeatedly.  E.g., like a soccer ball moving a circle in the grass ground. ◦ Due on 11/26/2014