120 likes | 317 Views
Multimedia Web Programming using Flash and ActionScript. Andrew Taylor Session 1 An Introduction to ActionScript. Starting Point - ActionScript. Doesn’t assume any prior knowledge of ActionScript, but does assume some basic understanding of Flash.
E N D
Multimedia Web Programmingusing Flash and ActionScript Andrew Taylor Session 1 An Introduction to ActionScript
Starting Point - ActionScript • Doesn’t assume any prior knowledge of ActionScript, but does assume some basic understanding of Flash. • Starting point is some familiarity with Flash: drawing tools, timeline, layers, movie publishing, the Properties and Actions panels, etc. (as covered in Developing Multimedia Assets).
Contact Details • Tutor- Andrew Taylor: andtay2001@hotmail.com • Programme Admin: tara@dcs.bbk.ac.uk • Assessment Issues: ian@dcs.bbk.ac.uk • My Birkbeck: www.bbk.ac.uk/mybirbeck/ • DCS Systems Group: sg@dcs.bbk.ac.uk • ITS Help Desk: its-helpdesk@bbk.ac.uk
Learning Objectives • Multimedia Programming aims to: • Increase your understanding of Flash and ActionScript • Introduce you to basic concepts of object-oriented programming using ActionScript: objects, classes, properties, methods, events and event handlers. • Show you how to create interactive web content using Adobe CS3 suite (Fireworks, Flash, ActionScript and Dreamweaver), e.g., interactive forms, quizzes, puzzles, photo-galleries and simple arcade-style games.
Schedule – Session 1 • A Flash Refresher • Basics of ActionScript 3.0 • The Actions and Output Panels • Events and Event Handlers • Introduction to Functions, Variables and Operators
Assignments • Tutor Marked Assignment (TMA) • Develop a Loan Calculator • 25% towards final mark • Due by beginning of Session 7 • Final Marked Assignment (FMA) • Interactive Flash Gallery and a Puzzle/Quiz • 75% towards final mark • Due 11th January 2010
Introduction to ActionScript • Aim of this module is to provide an introduction to the basics of ActionScript 3.0 • ActionScript is the native language of Flash - enables you to manipulate objects, movies, graphics, etc in creative ways. • ActionScript is an object-oriented scripting language – focus is on named ‘objects’. • ActionScript is based on the ECMA-262 (The European Computers Manufacturers Association) specification, which is an international standard for JavaScript.
Actionscript Basics - 1 • Actionscript is a programming language • Programming languages consist of a set of instructions that tell a computer what to do. • Actionscript shares a common syntax with other programming languages such as Java, JavaScript and C++ • Actionscript is used to add interactivity and conditional behaviours within Flash movies. • JavaScript used to add interactivity and conditional behaviour to web pages.
Actionscript Basics - 2 • A program is a list of instructions that tell a computer what to do (= a SCRIPT). • Programs or Scripts can only function within a specific environment. In the case of AS that environment is a Flash movie. • ActionScripts are small programs that control objects in Flash, eg. buttons, movie clips and how the user interacts with Flash. • In ActionScript 3.0 code is entered in the Actions layer or stored in a re-usable external file, e.g., actionscript.as • Actionscript controls what happens inside Flash, how it works and how the user interacts with a Flash movie.
Actionscript Basics - 3 • To be able to use Actionsript need to understand the basic elements of the programming language, its grammar and the punctuation it uses. • Actionscript is similar to other programming languages and uses many familiar English words, such as “goto”, “stop”, and “if” as well as simple math operators such as +, - and = • Actionscript comprises English words and mathematical symbols. Can usually guess at their meaning. Uses dot syntax (.)
Actionscript Basics - 4 Used simple scripts in Multimedia Assets to control a movie (but note these were AS 2.0):stop(); on (release) { gotoandstop(1);} on (press) { prevframe();} Will see that things have changed in ActionScript 3.0
Actionscript - Uses • Provide navigation: control how a user plays a movie, stopping, pausing, continuing. • To control animation: movement and positioning • Getting user input: can ask questions or create order forms. • Perform Calculations: user interaction to calculate loan or mortgage payments. • Play sounds: can control duration, volume, etc. • Essentially no limitations