Upload
nevada-kirby
View
31
Download
1
Embed Size (px)
DESCRIPTION
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. - PowerPoint PPT Presentation
Citation preview
Multimedia Web Programmingusing Flash and ActionScript
Andrew Taylor
Session 1
An Introduction to ActionScript
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 2
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).
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 3
Contact Details
Tutor- Andrew Taylor: [email protected] Programme Admin: [email protected] Assessment Issues: [email protected] My Birkbeck: www.bbk.ac.uk/mybirbeck/ DCS Systems Group: [email protected] ITS Help Desk: [email protected]
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 4
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.
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 5
Schedule – Session 1
A Flash RefresherBasics of ActionScript 3.0The Actions and Output PanelsEvents and Event HandlersIntroduction to Functions, Variables and
Operators
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 6
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
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 7
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.
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 8
Actionscript Basics - 1Actionscript is a programming languageProgramming 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.
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 9
Actionscript Basics - 2A 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.
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 10
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 (.)
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 11
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
ITApps 2009/10 - Multimedia Web Programming 1 using Flash and ActionScript (MP) Session1 : 12
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