Interface Programming 2 Week 1

Slides:



Advertisements
Similar presentations
Introduction to Macromedia Director 8.5 – Lingo
Advertisements

1What is the Stage. 2How do you open a panel in Flash
Tutorial 7 Planning and Creating a Flash Web Site.
© 2010 Delmar, Cengage Learning Chapter 9: Using ActionScript.
The Web Warrior Guide to Web Design Technologies
Copyright © 2003 Pearson Education, Inc. Chapter 7 – Slide 1 by Michael Kay The Web Wizard’s Guide to Flash.
 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.
Introducing ActionScript 3.0 Object-oriented programming language Used to power Flash Player Similar to JavaScript Can be embedded in a Flash project.
Flash Workshop Flash Workshop :: Agenda  Introductions  Look at a few Flash Examples  Flash Web Sites  Flash Web Applications  Flash Games.
1 Flash Actionscript Adding Interactive Actions Variables.
Macromedia Flash 5 Advanced Level Course. Using Actions Toolbox ListActions List Parameters area Add/Delete a StatementMove Action Up/Down Expand/Collapse.
Kapi’olani Community College Art 258 Interface Programming II In-class Presentation Week 5A.
1 Flash Actionscript Adding Interactive Actions. 2 ActionScript 3.0 ActionScript is the language you use to add interactivity to Flash applications, whether.
1 Flash Programming Introduction Script Assist. 2 Course Description This course concentrates on the teaching of Actionscript, the programming language.
AD 206 Intermediate CG : School of Art and Design : University of Illinois at Chicago : Spring 2009 Intro to Action Script 9 "The games of a people reveal.
© 2011 Delmar, Cengage Learning Chapter 8 Building Complex Animations.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Chapter 3 Working with Symbols and Interactivity.
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
BUILDING RICH MEDIA ELEMENTS. Design Decisions Based on Design Specification  Following the design specification will ensure that the application is.
Introduction to Flash FYS100 Creative Discovery in Digital Art Forms Spring 2007 Burg.
Tutorial 5 Making a Document Interactive. XP Objectives Explore the different button states Add a button from the Button library Create a button Learn.
Tutorial 5 Making a Document Interactive. XP Objectives Explore the different button states Add a button from the Buttons library Edit a button instance.
© 2011 Delmar, Cengage Learning Chapter 9 Introduction to ActionScript 3.0.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
© 2012 Adobe Systems Incorporated. All Rights Reserved. Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® INTRODUCTION TO FLASH ANIMATION.
® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH PROFESSIONAL CS5.
Tutorial 8 Programming with ActionScript 3.0. XP Objectives Review the basics of ActionScript programming Compare ActionScript 2.0 and ActionScript 3.0.
Getting a handle on ActionScript A basic primer for non-programmers.
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.
Adobe Flash CS3 Revealed Chapter 3 - WORKING WITH SYMBOLS AND INTERACTIVITY.
Introduction to Flash MX 2004: Action Scripting Lloyd Rieber.
INTRO TO ACTIONSCRIPT 3.0 The Bad News: Learning ActionScript is as Much Fun as Being Torn Apart By a Pack of Crazed Wombats. (And I say that in a loving.
2006 Adobe Systems Incorporated. All Rights Reserved. 1 INTRODUCTION TO ADOBE FLASH CS3.
Introduction to Flash Animation CS 318. Topics Introduction to Flash and animation The Flash development environment Creating Flash animations  Layers.
© Anselm Spoerri Lecture 10 – Related: Part 1 Flash –Build Flash Website with Animated Navigation Structure –Decide on Overall Navigation Layout, Import.
XP Tutorial 8 Adding Interactivity with ActionScript.
1 Actionscript for Flash by Dr SC Li. 2 Understanding more about instances Symbolsgraphics buttons Movie clips Instances (without names) No interaction.
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.
Computer Game Design ActionScript is… Object-oriented programming Everything you do in ActionScript does something to some object* Some objects.
SCRIPT PROGRAMMING WITH FLASH Introductory Level 1.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
CIS 205—Web Design & Development Flash Chapter 3 Appendix on Using Buttons.
INTRO TO ACTIONSCRIPT 3.0 The Bad News: Learning ActionScript is as Much Fun as Being Torn Apart By a Pack of Crazed Wombats. (And I say that in a loving.
Open a new Flash File Action Script 2.0. Create a button like you did last lesson and name it Click to Play.
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.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Intro to ActionScript CIS 126 Greg Shorts. What Is ActionScript? ActionScript is the scripting language Flash uses to control its movies and the objects.
XP Tutorial 8 Adding Interactivity with ActionScript.
 Movieclip symbols are reusable pieces of flash animation  consisting usually of one or more graphic/button symbols  thus they are flash movies within.
Kapi’olani Community College Art 258 Interface Programming II In-class Presentation Week 1A.
Visual Basic.NET Windows Programming
Topic 02: Introduction to ActionScript 3.0
Creating a Flash Web Site
Using Video, and Flash Components, and Printing Flash Content
Background Information
ActionScript Basics 2016 (2.0 – 3.0)
Adding Buttons, Actions, and Sounds
Flash Demonstration – Unit 5 – ActionScript 2.0
Unit Lessons Work with actions
INTRODUCTION TO ADOBE FLASH CS4
Animate Some more advanced concepts
T. Jumana Abu Shmais – AOU - Riyadh
INTRODUCTION TO FLASH ANIMATION
Working with Symbols and Interactivity
MovieCLip Instances & ActionScript
Flash Demonstration – Unit 5
Kapi’olani Community College
Adobe Flash CS3 Revealed
Presentation transcript:

Interface Programming 2 Week 1

:: Calendar

:: This Week's Agenda Introduction to the course In this class we will use Flash's programming language, ActionScript, to learn how to create interactive Flash applications and web sites. During the 1st half of the semester we will work on small interactive Flash applications and mini projects. During the 2nd half of the semester we will create a Flash web site. This project will be the same final project as the Motion Graphic Design final project.

:: Example Flash Kit http://www.flashkit.com

:: Examples Old 2advanced site (v2)‏ http://v2.2a- archive.com/flashindex.htm Samsung product showcase flash mini site CCA Director’s presentation flash site

:: Lesson What is actionscript?

:: Lesson Glossary: Syntax: the grammatical structure of a particular language, or the set of rules for arranging words and punctuation. These rules determine what is acceptable by the compiler. Compiler: translates code from one language to another.

:: Lesson Introduction to Actionscript How to create a button Adding an actions layer Working with the actions panel How to create a button How to control the timeline using actionscript Mouse Events Using frame labels Trace command and the Output window.

:: Lesson – Intro to ActionScript ActionScript is Adobe Flash's programming language. It enables you to make your Flash content interactive and provides a more efficient way to do things in Flash, from creating simple animations through designing complex, data-rich, interactive application interfaces. The latest version is Actionscript 3.0 which came out recently with the release of Flash player 9 and Flash CS3. Throughout the beginning of the semester I will talk about version 2.0.

:: Lesson – Intro to ActionScript 2.0 Good practices Always indent your code Always try to keep your code in one place Suggestion: keep all actions in one frame on the main time line (unless you are working on a large-scale site – you can use classes and other advanced techniques)‏ This makes your code easy to find and easy to debug AVOID ATTACHING CODE TO OBJECTS! Be careful of your use of capitalization. Remember, Flash is case sensitive.

:: Lesson – Intro to ActionScript 2.0 Terminology: Data Variables Statements Actions Expressions Operands and operators Dot syntax Punctuators Constants Keywords Events Event Handlers

:: Lesson – Intro to ActionScript 2.0 Statements and “Actions” Learning ActionScript syntax (Syntax: the grammatical structure of language) and statements is like learning how to put together words to make sentences, which you can then put together into paragraphs. ActionScript can be as simple. For example, in English, a period ends a sentence; in ActionScript, a semicolon ends a statement. A statement is an instruction you give the FLA file to do something, such as to perform a particular action. stop(); gotoAndStop(25);

:: Lesson – Intro to ActionScript 2.0 Action parameters The properties and values that go inside of an action. gotoAndPlay( frame number or label ); gotoAndStop( frame number or label );

:: Lesson – Intro to ActionScript 2.0 Expressions Expressions, different from statements, are any legal combination of ActionScript that represent a value. Expressions have values, while values and properties have types. An expression can consist of operators and operands, values, functions, and procedures. The expression follows ActionScript rules of precedence and of association. Typically, Flash Player interprets the expression and then returns a value that you can use in your application. x = 5; x = (y + 5) / 10;

:: Lesson – Intro to ActionScript 2.0 Operands and Operators Operators are characters that specify how to combine, compare, or change values in an expression. An expression is any statement that Flash can evaluate and that returns a value. You can create an expression by combining operators and values or by calling a function. An operand is the part of your code that the operator performs actions on. x = 5; x and 5 are operands and + is an operator.

:: Lesson – Intro to ActionScript 2.0 Properties values associated with movie clips. ._x ._y ._xmouse ._ymouse

:: Lesson – Intro to ActionScript 2.0 Punctuators Punctuators are the characters that help form your ActionScript code. There are several language punctuators in Flash. The most common type of punctuators are semicolons (;), colons (:), parentheses [()] and braces ({}).

:: Lesson – Intro to ActionScript 2.0 Keywords Keywords in ActionScript are reserved words used to perform specific kinds of actions, so you can't use them as identifiers (such as variable, function, or label names). Examples of some reserved keywords are if, else, this, function, and return. Keywords turn blue in the actions panel.

:: Lesson – Intro to ActionScript 2.0 Events Events are actions that occur while a SWF file is playing. An event such as a mouse click or a keypress is called a user event because it occurs as a result of direct user interaction. An event that Flash Player generates automatically, such as the initial appearance of a movie clip on the Stage, is called a system event because it isn't generated directly by the user.

:: Lesson – Intro to ActionScript 2.0 Event Handlers An event handler method is a method of a class that is invoked when an event occurs on an instance of that class. For example, the MovieClip class defines an onPress event handler that is invoked whenever the mouse is pressed on a movie clip object. Unlike other methods of a class, however, you don't invoke an event handler directly; Flash Player invokes it automatically when the appropriate event occurs. onPress onRelease onRollover onMouseDown onEnterFrame onClipEvent

:: Lesson – Intro to ActionScript 2.0 dot (.) syntax In ActionScript, you use a dot (.) operator (dot syntax) to access properties or methods that belong to an object or instance on the Stage. You also use the dot operator to identify the target path to an instance (such as a movie clip), variable, function, or object. A dot syntax expression begins with the name of the object or movie clip, followed by a dot, and it ends with the element you want to specify. noun.action movieclip.action mc_nestedContent.gotoAndStop(“about”); mc_ball.onPress = function() { }

:: Lesson – Intro to ActionScript 2.0 Targeting an instance, and nested instances movieclip.nestedmovieclip.action movieclip.stop(); mc_content.mc_nestedContent.gotoAndStop(“about_sub3”);

:: Lesson – Intro to ActionScript 2.0 Common actions Button & Mouse events myBtn.onRelease = function() { //do something } myBtn.onRollover = function() {

:: Lesson – Intro to ActionScript 2.0 Common Event Handler onEnterFrame very useful because Flash will continually repeat the code myMovieClip.onEnterFrame = function() { //do something }

:: Lesson – Intro to ActionScript 2.0 How to comment code: blocks of text: /* and */ one line at a time: //

:: Lesson – Intro to ActionScript 2.0 Script Assist If you are uncomfortable writing ActionScript code or syntax, you might want to try using Script Assist mode in the Actions panel. It can be helpful while learning ActionScript, and it can be a useful resource when you forget how to hand- code something.

:: Assignment Due : Week2A By using actionscript and simple buttons, create a very simple, working flash file that controls where you are on the timeline. Format: .swf Post this swf on your class web site.