Flash Another Look 21-Nov-15 Computing Engineering and Technology 1 Flash.

Slides:



Advertisements
Similar presentations
Introduction to Macromedia Director 8.5 – Lingo
Advertisements

Game Programming Patterns Game Loop
Presented By, Sripad Sarode
 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.
Adding Interactivity to Flash Movies Using Buttons and ActionScript SPACE Lab
Macromedia Flash MX 2004 – Design Professional and Interactivity WORKING WITH SYMBOLS.
Lecture Supp (11) Week 10 lecture exercise [Given Code] LectEx10_ShowPrimeNumbers.html If we remove both “var” for i, then the new window shows ‘3’ repeatedly.
Flash Workshop Flash Workshop :: Agenda  Introductions  Look at a few Flash Examples  Flash Web Sites  Flash Web Applications  Flash Games.
1 Flash Actionscript Animation. 2 Introduction to Sprites We will now look at implementing Sprites in Flash. We should know enough after this to create.
Work with symbols and instances Work with Libraries Create buttons Assign actions to buttons Unit Lessons.
1 Flash Actionscript Adding Interactive Actions Variables.
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.
(An Introduction for Programmers)
1 Flash Programming Introduction Script Assist. 2 Course Description This course concentrates on the teaching of Actionscript, the programming language.
© 2011 Delmar, Cengage Learning Chapter 8 Building Complex Animations.
COM 205 Multimedia Applications
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.
Dynamic Web Pages (Flash, JavaScript)
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
1 SEG3120 Analysis and Design for User Interfaces Flash Anis Zarrad Parallel Simulations and Distributed Systems (PARADISE) Research Laboratory SITE, University.
Chapter 11 Adding Sound and Video. Chapter 11 Lessons 1.Work with sound 2.Specify synchronization options 3.Modify sounds 4.Use ActionScript with sound.
© 2011 Delmar, Cengage Learning Chapter 9 Introduction to ActionScript 3.0.
Enhancing JavaScript Using Application Programming Interfaces (APIs)
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
CS101 Introduction to Computing Lecture Programming Languages.
1. Produce a folio of tasks that demonstrate a progression in acquiring and applying programming knowledge (ie. learn Visual Basic) 2. Learn about computer.
CMPD 434 MULTIMEDIA AUTHORING Chapter 06 Multimedia Authoring Process IV.
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
Flash ActionScript Thomas Lövgren – Flash developer HUMlab & Kulturverket Introduction to “What is Flash?" At first, said.
CSE 3 Fluency in Information Technology Michelle Christiana Lee University of CA, San Diego Computational Thinking- This course seeks to promote the enhancement.
Programming games Show your version of Bo the dog. Start cannonball Preview: video, audio work session (cannonball) Homework: Cannonball with ball in a.
XP Tutorial 4 Special Animations. XP New Perspectives on Macromedia Flash MX Special Layers for Animation Animation Using a Motion Guide Layer.
Introduction to Flash MX 2004: Action Scripting Lloyd Rieber.
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
Game Maker Terminology
Reading Flash. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also choose some.
© 2011 Delmar, Cengage Learning Chapter 10 Using ActionScript to Enhance User Experience.
Game Programming Patterns Game Loop From the book by Robert Nystrom
Computer Game Design ActionScript is… Object-oriented programming Everything you do in ActionScript does something to some object* Some objects.
1 A Basic Introduction to Flash. Outline What is a flash? Macromedia Flash MX 2004 Flash concepts Flash Demos Conclusion Additional help 2.
SCRIPT PROGRAMMING WITH FLASH Introductory Level 1.
T HE G AME L OOP. A simple model How simply could we model a computer game? By separating the game in two parts: – the data inside the computer, and –
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.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
AD 305 Electronic Visualization I : School of Art and Design : University of Illinois at Chicago : Spring 2007 Intro to Action Script 12 "The games of.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
CMPD 434 MULTIMEDIA AUTHORING Chapter 06 Multimedia Authoring Process IV.
Intro to ActionScript CIS 126 Greg Shorts. What Is ActionScript? ActionScript is the scripting language Flash uses to control its movies and the objects.
Macromedia Flash MX Design Professional And Interactivity WORKING WITH SYMBOLS.
AD 206 Intermediate CG : School of Art and Design : University of Illinois at Chicago : Spring 2009 Intro to Action Script 11 "The games of a people reveal.
JavaScript Invented 1995 Steve, Tony & Sharon. A Scripting Language (A scripting language is a lightweight programming language that supports the writing.
Introducing Scratch Learning resources for the implementation of the scenario
 Movieclip symbols are reusable pieces of flash animation  consisting usually of one or more graphic/button symbols  thus they are flash movies within.
Martin Norris Computing Teacher/Leader at Moldgreen Community Primary School, Huddersfield
School of Computer Science Space School 2015 Programming a Lunar Lander Game.
Topic 02: Introduction to ActionScript 3.0
Web Programming– UFCFB Lecture 9
Learn… Create… Program
Learn… Create… Program
Welcome to SCRATCH.
Working with Symbols and Interactivity
Learn… Create… Program
Learn… Create… Program
Web Programming– UFCFB Lecture 9
Introduction to JavaScript
Presentation transcript:

Flash Another Look 21-Nov-15 Computing Engineering and Technology 1 Flash

Flash Another Look 21-Nov-15 Computing Engineering and Technology 2 Ch.Ch.Ch…Changes David Bowie “Only the wisest and stupidest of men never change.” – Confucius “Change is inevitable - except from a vending machine.” – Robert C. Gallagher “We cannot become what we need to be by remaining what we are.” – Max Depree “To change and to change for the better are two different things.” – German proverb

Flash Another Look 21-Nov-15 Computing Engineering and Technology 3 Why Scripting ? Import and export information, create forms, network communications programs Personalise the user’s experience Control movie clips and their properties more tightly

Flash Another Look 21-Nov-15 Computing Engineering and Technology 4 Why Scripting ? Build dynamic projects that vary according to information like weather data or the day of the week Dynamically control sound volume and stereo panning

Flash Another Look 21-Nov-15 Computing Engineering and Technology 5 ActionScript (AS 1) ActionScript 1 (Flash 1-5) Good for simple interactivity Basic “Glue” coding Plenty of code available but – code rough Limited capabilities led to some bad coding Non-Standard language – loosely related to JavaScript Was very slow Even sloppy code runs

Flash Another Look 21-Nov-15 Computing Engineering and Technology 6 ActionScript (AS 2) ActionScript 2 (Flash 2004 – 8) A proper OO language Good for more complex coding Deeper control of Flash capabilities More flexible programming environment Better de-bugging capabilities Cleaner coding – more readable (transferable.dir) Stricter syntax and error checking

Flash Another Look 21-Nov-15 Computing Engineering and Technology 7 ActionScript (AS 3) ActionScript 3 (CS3 – CS4) Full OO language Everything is now an object which can or has to be called up dynamically. Objects are embedded into objects as children ie:- the screen is an object which has active sprites within it as children. A child inherits attributes from the parent as well as controlling their own attributes.

Flash Another Look 21-Nov-15 Computing Engineering and Technology 8 Adaptability You can still program using ActionScript 1.0 in Flash MX 2004 and in Flash 8 Performance of AS1 is good in MX 2004 and Flash 8 ActionScript 2 code strongly resembles Java ActionScript 2 knowledge can easily be re-used in the industrial strength, cross-platform world of Java

Flash Another Look 21-Nov-15 Computing Engineering and Technology 9 Adaptability The code in Flash now runs a minimum of 5 times faster than AS 1 This opens Flash up to more potential uses especially the world of on-line and mobile games and communication using complex processing

Flash Another Look 21-Nov-15 Computing Engineering and Technology 10 Tricks & Traps AS2 upwards is case sensitive nCounter != ncounter != NCounter Note older code may not work stopAllSounds(); // works stopallsounds(); // does not when using AS2 code Stricter data typing improves run-time performance AS 2 upwards has strict data typing var nCounter:Number = 36 The variable (nCounter) of type (Number) = 36

Flash Another Look 21-Nov-15 Computing Engineering and Technology 11 Loop gotoAndPlay() Loops can be used to create a menu section where the film is waiting for a key or mouse event to happen

Flash Another Look 21-Nov-15 Computing Engineering and Technology 12 Loop gotoAndPlay() Buttons can be used to break the loop Loop.htm

Flash Another Look 21-Nov-15 Computing Engineering and Technology 13 Key Class Key press can also be used… Key1.htm

Flash Another Look 21-Nov-15 Computing Engineering and Technology 14 Key Class The script needs to account for the frame the video head is moving through. onEnterFrame = function() { if(Key.isDown(Key.UP)){ gotoAndPlay(1); }

Flash Another Look 21-Nov-15 Computing Engineering and Technology 15 Screen Plotting The screen is plotted from the top left hand corner of the user screen.._x is the horizontal plotting position._y is the vertical plotting position Objects can be placed on the desktop (off main screen) and called into position at will.

Flash Another Look 21-Nov-15 Computing Engineering and Technology 16 Screen Plotting The number relates to the position on screen relative to screen size Hence –._x =150 would be half way across a 300 pixel screen

Flash Another Look 21-Nov-15 Computing Engineering and Technology 17 Screen Plotting If you wanted an object to move onto and across the screen you would start it off in a -._x position then give it a variable speed. Round._x = -50

Flash Another Look 21-Nov-15 Computing Engineering and Technology 18 Screen Plotting Scroll.htm The scripting would go so… var speed:Number = 10 onEnterFrame = function() { if(Key.isDown(Key.RIGHT)) { round._x += speed; }

Flash Another Look 21-Nov-15 Computing Engineering and Technology 19 Screen Plotting The project is built up in small sections each overlaying the next to create the effect needed. Key X-Y.htm

Flash Another Look 21-Nov-15 Computing Engineering and Technology 20 var speed:Number =3 onEnterFrame = function() { if (Key.isDown(Key.RIGHT)){ round._x += speed; round._y += speed; } else if (Key.isDown(Key.LEFT)){ round._x -= speed; round._y -= speed; } else if (Key.isDown(Key.DOWN)){ round._y += speed; round._x -= speed; } else if (Key.isDown(Key.UP)){ round._y -= speed; round._x += speed; } else if(Key.isDown(65)) { round._x -= speed; } else if (Key.isDown(68)) { round._x += speed; }else if (Key.isDown(87)) { round._y -= speed; }else if (Key.isDown(83)) { round._y += speed; }

Flash Another Look 21-Nov-15 Computing Engineering and Technology 21 Interaction It is then possible to begin to create imagery to fit into the scene. Full.htm You begin to develop more involved interaction.

Flash Another Look 21-Nov-15 Computing Engineering and Technology 22 Conclusion Giving the user the ability to control items creates interactivity. Control of items is built up by creating small functions. Functions can work together to create sophisticated imagery and action.

Flash Another Look 21-Nov-15 Computing Engineering and Technology 23 References ActionScript 2.0: A Real Programming Language Introducing ActionScript 2 astfts_excerpt/astfts_lesson1.pdf, /actionscript.html astfts_excerpt/astfts_lesson1.pdf /actionscript.html Kirupa ActionScript 2.0 OOP x.htm x.htm