XP Tutorial 8 Adding Interactivity with ActionScript.

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

Introducing JavaScript
Learning the Basics – Lesson 1
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Tutorial 6 Creating a Web Form
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
© 2010 Delmar, Cengage Learning Chapter 9: Using ActionScript.
The Web Warrior Guide to Web Design Technologies
 2005 Pearson Education, Inc. All rights reserved Introduction.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic JavaScript: Introduction to Scripting.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Tutorial 6 Working with Web Forms
Tutorial 10 Programming with JavaScript
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
XP Tutorial 1 New Perspectives on JavaScript, Comprehensive1 Introducing JavaScript Hiding Addresses from Spammers.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
A First Program Using C#
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
© 2011 Delmar, Cengage Learning Chapter 9 Introduction to ActionScript 3.0.
Publishing a Macromedia Flash Movie – Lesson 131 Publishing a Macromedia Flash Movie Lesson 13.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
XP Tutorial 1 Introduction to Macromedia Flash MX 2004.
Chapter 8 Cookies And Security JavaScript, Third Edition.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
1 JavaScript in Context. Server-Side Programming.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Tutorial 10 Programming with JavaScript. XP Objectives Learn the history of JavaScript Create a script element Understand basic JavaScript syntax Write.
Tutorial 10 Programming with JavaScript
Done by: Hanadi Muhsen1 Tutorial 1.  Learn the history of JavaScript  Create a script element  Write text to a Web page with JavaScript  Understand.
Tutorial 8 Programming with ActionScript 3.0. XP Objectives Review the basics of ActionScript programming Compare ActionScript 2.0 and ActionScript 3.0.
Using Client-Side Scripts to Enhance Web Applications 1.
7-1 OBJ Copyright 2003, Paradigm Publishing Inc. Using ActionScript and Creating Templates Macromedia Flash Design & Application.
Tutorial 7 Planning and Creating a Flash Web Site.
XP Tutorial 6 New Perspectives on JavaScript, Comprehensive1 Working with Windows and Frames Enhancing a Web Site with Interactive Windows.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Introduction to JavaScript CS101 Introduction to Computing.
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
XP Tutorial 7 Creating a Flash Web Site. XP New Perspectives on Macromedia Flash 82 Objectives Plan and create a Flash Web site Create a Flash template.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Basic ActionScript and PHP Cis 126. Getting Started set up a basic folder structure so we can keep our files organized. Mirror this structure on your.
XP Tutorial 8 Adding Interactivity with ActionScript.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
Tutorial 6 Creating a Web Form
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
Creating a Flash Web Site
Programming Web Pages with JavaScript
Tutorial 10 Programming with JavaScript
Unit Lessons Work with actions
Section 17.1 Section 17.2 Add an audio file using HTML
4. Javascript Pemrograman Web I Program Studi Teknik Informatika
WEB PROGRAMMING JavaScript.
PHP.
Tutorial 10 Programming with JavaScript
Tutorial 10: Programming with javascript
Presentation transcript:

XP Tutorial 8 Adding Interactivity with ActionScript

XP New Perspectives on Macromedia Flash MX Programming with ActionScript ActionScript is a robust programming language that gives the Flash developer an almost unlimited number of ways to make a Flash document interactive. ActionScript can also be used to write complete programming applications such as a shopping card application in which the user can enter data, make selections, and then make a purchase.

XP New Perspectives on Macromedia Flash MX Programming with ActionScript Input fields Make selections here

XP New Perspectives on Macromedia Flash MX Working with Objects and Properties ActionScript is used to control and modify objects. An object is an element in Flash that has properties or characteristics that can be examined or changed with ActionScript. Working with objects in ActionScript often requires that you assign names to them.

XP New Perspectives on Macromedia Flash MX Working with Objects and Properties

XP New Perspectives on Macromedia Flash MX Using Actions, Methods, and Functions An action is a statement that instructs a SWF file to do something. Functions are blocks of statements that process information and return a value or perform some action. The values you send to a function are called parameters or arguments and are enclosed in parentheses. Methods are functions specific to a particular object.

XP New Perspectives on Macromedia Flash MX Writing ActionScript Using Variables, Expressions, Operators, and Comments A variable is a container that holds information while the SWF file s playing. A keyword is a word or phrase that already has a specified use or meaning in ActionScript and cannot be reused in another context in a statement. An expression is a statement that is used to assign a value to a variable. String data is a series of characters, such as letters, numbers, and punctuation, and is always enclosed in quotation marks.

XP New Perspectives on Macromedia Flash MX Writing ActionScript Using Variables, Expressions, Operators, and Comments Numeric data is a number or numbers that are not enclosed in quotes. Operators are used in expressions to tell Flash how to manipulate the values in the expression. –The equal sign is an example of an assignment operator –ActionScript also has arithmetic operators, such as +, -, *, and / –A comparison operator is used in conditional statements –A conditional statement is one in which one value is compared to another. Comments are notes within the ActionScript code that explain what is happening.

XP New Perspectives on Macromedia Flash MX Comments Comment in Script Pane

XP New Perspectives on Macromedia Flash MX Writing ActionScript Code When writing ActionScript code, you need to follow certain rules, known as the syntax of the language.

XP New Perspectives on Macromedia Flash MX Linking to Web Sites Using the getURL() Function The getURL() function loads a document such as a Web page into a browser window. The format is getURL(url, window) –url is the address of the Web site you want to open in the browser window –The argument window can be one of several options

XP New Perspectives on Macromedia Flash MX The window Argument _ self —Specifies that the Web site document be opened in the current browser window; this replaces the currently displayed document _ blank —Specifies that the Web site document be opened in a new browser window; the currently displayed document remains opened in its own browser window _ parent —Specifies that the Web site document be opened in the parent of the current frame; this applies when you are using frames to display your Web site; frames split the browser window into more than one window and allow you to display several Web documents at one time _ top —Specifies that the Web site document be opened in the top- level frame in the current window; this applies when you are using frames to display your Web site

XP New Perspectives on Macromedia Flash MX getURL() Function get URL ( ) function arguments

XP New Perspectives on Macromedia Flash MX Creating an Input Form An input form is a common element found on many Web sites on the Internet. An input form allows the user to enter data into input fields. A page developed with Flash can allow the user to enter data, have the data processed, and return a result directly from the Flash Player on the user’s computer.

XP New Perspectives on Macromedia Flash MX Using Dynamic and Input Text Static text cannot be changed after the document plays in the Flash Player. Dynamic text can receive text in the form of characters or numbers from a Web server or from an expression in ActionScript and display the text on a Web page in the Flash Player.

XP New Perspectives on Macromedia Flash MX Using Dynamic and Input Text

XP New Perspectives on Macromedia Flash MX Dynamic Text Options Refer to figure 8-16 in your text for a summary of Dynamic Text Options including:  Instance Name text box  Line type list box  Selectable button  Render text as HTML button  Show border around text button  Variable text box  Edit characters options button

XP New Perspectives on Macromedia Flash MX Input Text Input text is used to allow the user to enter text into the text block. This text can then be stored in a variable and used in an ActionScript script. To create an input text block, use the Text tool and select Input Text from the Text type list box in the Property inspector.

XP New Perspectives on Macromedia Flash MX Options for Input Text Text type list box Maximum Characters Allowed text box

XP New Perspectives on Macromedia Flash MX Using a Flash Preloader A SWF file is downloaded over the Internet from a Web server to the user’s computer, known as the client computer. A major factor that affects the amount of time it takes a file to download is the size of the file, measured in kilobytes. –A kilobyte is approximately 1000 bytes. –A byte is equivalent to one character of information.

XP New Perspectives on Macromedia Flash MX Using a Flash Preloader Flash files are streaming, which means that as the file is downloading, the initial content can start playing while to rest of the content continues to be downloaded. Flash developers usually add a preloader, which is a short animation or message located in the first few frames of the Flash file. The preloader typically contains a short animation and the word “Loading” to indicate to the site visitor that the Web site is still loading.

XP New Perspectives on Macromedia Flash MX Sample Preloaders

XP New Perspectives on Macromedia Flash MX Preloader Logic The pseudocode for the preloader logic is as follows: –Get the total number of bytes –Get the number of bytes loaded –If the number of bytes loaded equals the total number of bytes Play the rest of the SWF file else continue playing the preloader animation

XP New Perspectives on Macromedia Flash MX Preloaders