B.Sc. Multimedia ComputingMultimedia Authoring Introduction to ActionScript.

Slides:



Advertisements
Similar presentations
© 2010 Delmar, Cengage Learning Chapter 9: Using ActionScript.
Advertisements

1 PHP Statement Constructs Server Scripting. 5-2 Basic Statement All Statements end in a semicolon. Statements are delimited from the HTML code by enclosing.
Introducing ActionScript 3.0 Object-oriented programming language Used to power Flash Player Similar to JavaScript Can be embedded in a Flash project.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Flash Workshop Flash Workshop :: Agenda  Introductions  Look at a few Flash Examples  Flash Web Sites  Flash Web Applications  Flash Games.
Introduction to Programming with Java, for Beginners Arrays of Objects.
B.Sc. Multimedia ComputingMultimedia Authoring Introduction to ActionScript 3.0.
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
Kapi’olani Community College Art 258 Interface Programming II In-class Presentation Week 5A.
SM1205 Interactivity Topic 02: ActionScript 3.0 Fundamentals - Part I Hongbo Fu Spring 2011SCM-CityU1.
B.Sc. Multimedia ComputingMultimedia Authoring Using Arrays in Flash.
2012 •••••••••••••••••••••••••••••••••• Summer WorkShop Mostafa Badr
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 9 Interactive Multimedia Authoring with Flash - Introduction to Programming “Computers and Creativity” Richard D. Webster, COSC 109 Instructor.
Chapter 3 Working with Symbols and Interactivity.
CISC474 - JavaScript 03/02/2011. Some Background… Great JavaScript Guides: –
© 2011 Delmar, Cengage Learning Chapter 9 Introduction to ActionScript 3.0.
Chapter 4: Decision Making with Control Structures and Statements JavaScript - Introductory.
Introduction to JavaScript Gordon Tian
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.
1 Session 3: Flow Control & Functions iNET Academy Open Source Web Programming.
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 CS5 Introduction. What is Flash? Flash is a multimedia platform used to add animation, video, and interactivity to Web sites. It is often.
More Tips on Flash CSC361/661 Digital Media Spring 2007 Burg.
Variables and Functions. Open your Encoder program Let’s begin by opening the “Labyrinth Auto Straight” code. Save this file as Labyrinth with variables.
Functions & Objects Flash ActionScript 3.0 Introduction to Thomas Lövgren, Flash developer
ActionScript: Addressing Display Objects, Duplicating MovieClips, Attaching MovieClips Dynamically MMP 220 Multimedia Programming This material was prepared.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
ActionScript: Functions, Parameters, Functions that return a value, Variables, setInterval Functions MMP 220 Multimedia Programming This material was prepared.
JavaScript Syntax, how to use it in a HTML document
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
XP Tutorial 8 Adding Interactivity with ActionScript.
Reading Flash. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also choose some.
ActionScript: For Loops, While Loops, Concatenation and Arrays MMP 220 Multimedia Programming This material was prepared for students in MMP220 Multimedia.
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.
1 Server versus Client-Side Programming Server-SideClient-Side.
SCRIPT PROGRAMMING WITH FLASH Introductory Level 1.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
JavaScript. JavaScript Introduction JavaScript is the world's most popular programming language. It is the language for HTML and the web, for servers,
XP Tutorial 8 Adding Interactivity with ActionScript.
USING CONDITIONAL CODE AMIR KHANZADA. Conditional Statement  Conditional statements are the set of commands used to perform different actions based on.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
CGS 3066: Web Programming and Design Spring 2016 Introduction to JavaScript.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
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.
 Movieclip symbols are reusable pieces of flash animation  consisting usually of one or more graphic/button symbols  thus they are flash movies within.
ActionScript Programming Help
Topic 02: Introduction to ActionScript 3.0
var variableName:datatype;
Creating a Flash Web Site
CHAPTER 4 DECISIONS & LOOPS
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 10 Programming Fundamentals with JavaScript
Introduction to GIS PythonScript CGIS-NURIntroduction to ArcGIS II.
Web Systems & Technologies
ActionScript Basics 2016 (2.0 – 3.0)
JavaScript is a programming language designed for Web pages.
Unit Lessons Work with actions
Chapter 10 Programming Fundamentals with JavaScript
Interface Programming 2 Week 1
T. Jumana Abu Shmais – AOU - Riyadh
Tutorial 10: Programming with javascript
JavaScript Basics What is JavaScript?
Web Programming and Design
Lecture 9: JavaScript Syntax
Presentation transcript:

B.Sc. Multimedia ComputingMultimedia Authoring Introduction to ActionScript

Agenda Why learn ActionScript ? New features in ActionScript 2.0 ActionScript elements Actions Panel and Editor Planning your script-driven project Testing and debugging scripts B.Sc. Multimedia ComputingMultimedia Authoring

Why Learn ActionScript ? More control over movie clips and their properties Animate elements independently of the timeline Import and export data dynamically Dynamic control of sound and video Create objects that have physics-driven behaviors Personalize the user’s experience B.Sc. Multimedia ComputingMultimedia Authoring

ActionScript 2.0 Features Strict data typing aVariable = 5; // no type given, compiler has to work it out aVariable:Number = 5 // declare as being a number type Case sensitive myValue not the same as myvalue Class structures for custom objects B.Sc. Multimedia ComputingMultimedia Authoring

Elements Keywords Operators Assignment Class Definition Class Method Definition Class Instantiation Class Referencing B.Sc. Multimedia ComputingMultimedia Authoring

Structure and Syntax Semicolons Curly Braces Code Blocks Dot Syntax Parenthesis Script Spacing and Layout Comments B.Sc. Multimedia ComputingMultimedia Authoring

Comments // this is a comment on one line /* these are comments spanning more than one line */ /* a script to calculate the area of a circle */ var area : Number; // holds the value of the area var PI : Number = 3.142: // sets the value of PI var radius :Number = 5 ; // sets the value of PI area = PI * radius * radius // calculates the area and assigns it to the variable B.Sc. Multimedia ComputingMultimedia Authoring

Semicolons ; and Braces {} Semicolons separate statements Curly braces define code blocks B.Sc. Multimedia ComputingMultimedia Authoring

Operators Binary + - * / Logical AND && (5 1) is False Logical OR || (5 1) is True Equalty, = Assignment a = 5 B.Sc. Multimedia ComputingMultimedia Authoring

Equality == a = ‘5’ x = 5 if (a == x) is True a = 5 x = ‘6’ if (a == x) is False B.Sc. Multimedia ComputingMultimedia Authoring

Strict Equality === a = ‘5’ x = 5 Strict equality compares types === if ( a === x) is False a = 5 x = 5 if (a === x) is True B.Sc. Multimedia ComputingMultimedia Authoring

Branching - IF Statement if(condition) { statement(s); } if(name == "Erica"){ play(); } B.Sc. Multimedia ComputingMultimedia Authoring

Branching - switch var listernerObj:Obj = new Object(); { switch (String,fromCharCode(Key.getAscii())){ case “A” : // do something here Break; case “B : // do something here break: default; B.Sc. Multimedia ComputingMultimedia Authoring

Looping: while index = 4; while (index > 0){ // do something here index = index -1; // shorthand index -- } B.Sc. Multimedia ComputingMultimedia Authoring

Looping: do while index = 4; do { // do something here index = index -1; // shorthand index -- } while (index > 0); B.Sc. Multimedia ComputingMultimedia Authoring

Class Definition class Person { var name:String; var age :Number; } B.Sc. Multimedia ComputingMultimedia Authoring

Class Constructor function Person (name:String, age:Number) { this.name = name; this.age = age; } B.Sc. Multimedia ComputingMultimedia Authoring

Method Definition function getPersonDetails () :String { return(“Name: “ + this.name + ” Age: “ + this.age); } B.Sc. Multimedia ComputingMultimedia Authoring

Class Instantiation and References var newPerson: = new Person(“Jo Smith”, 23); Classes must be saved into external actionscript files e.g. myclass.as and in the same folder as the flash movie that uses the classes B.Sc. Multimedia ComputingMultimedia Authoring

ActionScript Editor Actions Toolbox Script Navigator Script Pane

References Flash MX 2004 actionscript training from the source Franklin D. Makar J. Macromedia Press 2004 B.Sc. Multimedia ComputingMultimedia Authoring